mycpp Code Generation

Measure the speedup from mycpp, and the resource usage.

Source code: oil/mycpp/examples

User Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
gc_stack_roots gen 0 2 8 0.000
loops gen 0 3 290 0.000
modules gen 0 0 183 0.000
fib_iter gen 8 4 889 0.009
asdl_generated gen 4 11 374 0.010
fib_recursive gen 11 11 881 0.012
parse gen 26 28 761 0.034
scoped_resource gen 47 46 1,031 0.046
tuple_return_value gen 17 18 190 0.087
files gen 7 8 69 0.108
containers gen 12 4 106 0.114
classes gen 3 3 19 0.168
length gen 41 46 205 0.200
cartesian gen 84 78 331 0.254
escape gen 94 88 352 0.268
cgi gen 263 268 513 0.513
varargs gen 12 17 20 0.581
control_flow gen 202 161 114 1.768

Max Resident Set Size (MB)

Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).

example name gen C++ C++-Souffle Python C++ : Python
classes gen 4.3 4.5 10.8 0.40
parse gen 3.8 3.9 7.7 0.49
asdl_generated gen 3.5 3.7 7.1 0.50
gc_stack_roots gen 3.5 3.5 6.9 0.51
cgi gen 3.7 3.7 7.1 0.52
escape gen 3.7 3.7 7.1 0.52
cartesian gen 3.7 3.5 6.9 0.53
fib_iter gen 3.7 3.7 6.9 0.53
length gen 3.7 3.8 6.9 0.53
fib_recursive gen 3.8 3.7 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
scoped_resource gen 3.8 3.5 7.1 0.54
files gen 3.8 3.9 6.9 0.55
modules gen 3.8 3.8 6.9 0.55
tuple_return_value gen 3.8 3.7 6.9 0.55
control_flow gen 3.9 3.9 6.9 0.57
containers gen 28.6 28.6 47.5 0.60
varargs gen 5.6 5.5 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 0 12 0.000
fib_iter gen 0 4 8 0.000
fib_recursive gen 0 0 12 0.000
files gen 0 0 8 0.000
scoped_resource gen 0 0 8 0.000
containers gen 4 11 33 0.123
parse gen 4 0 16 0.230
gc_stack_roots gen 2 0 4 0.457
loops gen 4 0 8 0.461
modules gen 2 2 4 0.471
asdl_generated gen 7 0 8 0.910
cgi gen 8 0 8 0.994
tuple_return_value gen 4 0 4 1.023
varargs gen 54 50 52 1.042
escape gen 12 16 4 2.946
cartesian gen 8 8 0 inf
control_flow gen 8 0 0 inf
length gen 4 0 0 inf

raw benchmark files