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++ Python C++ : Python
gc_stack_roots gen 0 8 0.000
fib_iter gen 8 881 0.009
modules gen 2 172 0.011
fib_recursive gen 11 880 0.012
loops gen 4 287 0.013
asdl_generated gen 11 374 0.029
parse gen 29 829 0.035
scoped_resource gen 43 1,042 0.041
files gen 4 67 0.058
tuple_return_value gen 20 192 0.105
containers gen 12 109 0.107
classes gen 3 18 0.182
length gen 40 198 0.203
cartesian gen 83 331 0.250
escape gen 106 342 0.311
cgi gen 266 515 0.517
varargs gen 12 11 1.077
control_flow gen 209 105 1.996

Max Resident Set Size (MB)

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

example name gen C++ Python C++ : Python
classes gen 4.5 10.8 0.41
cgi gen 3.5 7.1 0.50
gc_stack_roots gen 3.5 7.1 0.50
parse gen 3.8 7.5 0.51
cartesian gen 3.5 6.9 0.51
asdl_generated gen 3.7 6.9 0.53
fib_recursive gen 3.7 6.9 0.53
length gen 3.7 6.9 0.53
modules gen 3.7 6.9 0.53
scoped_resource gen 3.7 6.9 0.53
tuple_return_value gen 3.7 6.9 0.53
loops gen 3.8 7.1 0.54
escape gen 3.7 6.8 0.54
control_flow gen 3.8 6.9 0.55
fib_iter gen 3.8 6.9 0.55
files gen 3.8 6.8 0.56
containers gen 28.5 47.8 0.60
varargs gen 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ Python C++ : Python
asdl_generated gen 0 8 0.000
classes gen 0 13 0.000
control_flow gen 0 8 0.000
escape gen 0 8 0.000
fib_iter gen 0 12 0.000
fib_recursive gen 0 8 0.000
loops gen 0 12 0.000
modules gen 0 12 0.000
parse gen 0 12 0.000
tuple_return_value gen 0 4 0.000
containers gen 4 27 0.143
gc_stack_roots gen 2 4 0.471
files gen 4 8 0.495
length gen 4 8 0.496
varargs gen 53 60 0.875
cgi gen 4 4 0.994
scoped_resource gen 8 4 1.945
cartesian gen 8 4 1.978

raw benchmark files