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
classes gen 0 3 15 0.000
gc_stack_roots gen 0 0 4 0.000
loops gen 0 3 296 0.000
fib_iter gen 8 8 906 0.008
modules gen 2 2 181 0.010
fib_recursive gen 11 7 891 0.012
asdl_generated gen 7 11 376 0.019
parse gen 29 27 764 0.038
scoped_resource gen 43 42 1,033 0.042
files gen 4 8 72 0.052
tuple_return_value gen 14 18 192 0.071
containers gen 12 11 110 0.108
length gen 40 46 198 0.203
escape gen 97 100 350 0.276
cartesian gen 97 88 326 0.297
cgi gen 261 264 510 0.511
control_flow gen 207 161 110 1.882
varargs gen 21 25 8 2.625

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.5 4.5 10.8 0.41
parse gen 3.7 3.8 7.6 0.48
asdl_generated gen 3.5 3.5 6.9 0.51
escape gen 3.5 3.8 6.9 0.51
gc_stack_roots gen 3.5 3.5 6.9 0.51
scoped_resource gen 3.5 3.7 6.9 0.51
control_flow gen 3.7 3.9 7.1 0.52
modules gen 3.7 3.8 7.1 0.52
cgi gen 3.7 3.7 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
tuple_return_value gen 3.8 3.9 7.1 0.54
cartesian gen 3.7 3.5 6.8 0.54
fib_iter gen 3.8 3.7 6.9 0.55
files gen 3.8 3.7 6.9 0.55
length gen 3.8 3.7 6.9 0.55
fib_recursive gen 3.8 3.8 6.8 0.56
containers gen 28.7 28.6 47.5 0.60
varargs gen 5.5 5.5 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
control_flow gen 0 0 4 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 4 4 0.000
modules gen 0 0 8 0.000
parse gen 0 0 12 0.000
containers gen 4 4 27 0.144
classes gen 3 0 15 0.215
gc_stack_roots gen 2 2 8 0.230
length gen 4 0 8 0.497
varargs gen 46 41 64 0.722
asdl_generated gen 4 0 4 0.899
loops gen 4 0 4 0.919
files gen 4 0 4 0.935
scoped_resource gen 4 4 4 0.979
escape gen 8 4 4 1.923
cgi gen 8 4 4 2.014
cartesian gen 12 0 4 3.005
tuple_return_value gen 7 0 0 inf

raw benchmark files