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 290 0.000
fib_recursive gen 7 876 0.008
fib_iter gen 8 897 0.009
modules gen 2 171 0.011
asdl_generated gen 7 378 0.019
parse gen 26 815 0.032
scoped_resource gen 39 1,025 0.038
tuple_return_value gen 16 184 0.087
files gen 8 76 0.104
containers gen 12 114 0.108
classes gen 3 28 0.118
length gen 41 203 0.204
gc_stack_roots gen 2 8 0.265
cartesian gen 87 325 0.269
escape gen 119 345 0.344
cgi gen 247 511 0.483
varargs gen 23 15 1.517
control_flow gen 209 113 1.857

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.3 10.7 0.40
gc_stack_roots gen 3.4 6.9 0.49
escape gen 3.5 7.1 0.50
parse gen 3.8 7.6 0.50
cartesian gen 3.5 6.9 0.51
control_flow gen 3.7 7.1 0.52
asdl_generated gen 3.7 6.9 0.53
cgi gen 3.7 6.9 0.53
fib_recursive gen 3.7 6.9 0.53
files gen 3.7 6.9 0.53
scoped_resource gen 3.7 6.9 0.53
fib_iter gen 3.8 7.1 0.54
loops gen 3.8 7.1 0.54
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
containers gen 28.5 47.7 0.60
varargs gen 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ Python C++ : Python
classes gen 0 4 0.000
control_flow gen 0 8 0.000
fib_iter gen 0 4 0.000
gc_stack_roots gen 0 4 0.000
modules gen 0 12 0.000
containers gen 4 24 0.174
parse gen 4 12 0.306
length gen 4 12 0.347
fib_recursive gen 4 8 0.450
asdl_generated gen 4 8 0.451
escape gen 4 8 0.494
tuple_return_value gen 4 8 0.510
loops gen 4 8 0.521
varargs gen 43 58 0.742
cgi gen 8 8 0.997
cartesian gen 12 8 1.502
scoped_resource gen 8 4 1.955
files gen 0 0 NA

raw benchmark files