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
loops gen 0 291 0.000
fib_iter gen 8 882 0.009
modules gen 2 183 0.010
fib_recursive gen 11 877 0.012
asdl_generated gen 7 374 0.019
parse gen 29 775 0.038
scoped_resource gen 48 1,039 0.046
containers gen 8 99 0.079
tuple_return_value gen 20 196 0.102
files gen 8 76 0.102
classes gen 3 19 0.170
length gen 44 195 0.227
cartesian gen 81 326 0.249
gc_stack_roots gen 2 6 0.304
escape gen 106 343 0.309
cgi gen 260 504 0.517
varargs gen 16 20 0.784
control_flow gen 207 106 1.950

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
gc_stack_roots gen 3.4 7.1 0.48
asdl_generated gen 3.5 6.9 0.51
cartesian gen 3.5 6.9 0.51
cgi gen 3.5 6.9 0.51
parse gen 3.9 7.6 0.52
scoped_resource gen 3.7 7.1 0.52
escape gen 3.7 6.9 0.53
files gen 3.7 6.9 0.53
loops gen 3.8 7.1 0.54
fib_recursive gen 3.8 6.9 0.55
length gen 3.8 6.9 0.55
modules gen 3.8 6.9 0.55
tuple_return_value gen 3.8 6.9 0.55
control_flow gen 3.8 6.8 0.56
fib_iter gen 3.8 6.8 0.56
containers gen 28.7 47.8 0.60
varargs gen 5.6 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ Python C++ : Python
classes gen 0 11 0.000
escape gen 0 8 0.000
fib_iter gen 0 4 0.000
fib_recursive gen 0 12 0.000
gc_stack_roots gen 0 6 0.000
length gen 0 12 0.000
modules gen 0 8 0.000
parse gen 0 8 0.000
scoped_resource gen 0 12 0.000
containers gen 8 36 0.219
asdl_generated gen 4 8 0.449
loops gen 4 8 0.461
control_flow gen 4 8 0.506
varargs gen 51 52 0.980
cgi gen 8 8 0.986
cartesian gen 8 4 2.045
files gen 0 0 NA
tuple_return_value gen 0 0 NA

raw benchmark files