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
classes gen 0 31 0.000
gc_stack_roots gen 0 4 0.000
modules gen 0 184 0.000
fib_iter gen 4 894 0.004
fib_recursive gen 11 871 0.012
loops gen 4 296 0.012
asdl_generated gen 11 368 0.030
parse gen 30 763 0.039
scoped_resource gen 43 1,039 0.042
tuple_return_value gen 16 190 0.085
containers gen 9 110 0.085
files gen 8 71 0.111
length gen 41 213 0.191
cartesian gen 78 340 0.231
escape gen 103 352 0.292
cgi gen 269 516 0.521
varargs gen 21 20 1.035
control_flow gen 205 107 1.919

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.8 0.40
cartesian gen 3.4 6.9 0.49
gc_stack_roots gen 3.5 7.1 0.50
parse gen 3.9 7.6 0.52
asdl_generated gen 3.7 7.1 0.52
length gen 3.7 7.1 0.52
cgi gen 3.7 6.9 0.53
escape gen 3.7 6.9 0.53
fib_recursive 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
modules gen 3.7 6.8 0.54
fib_iter gen 3.8 6.9 0.55
files gen 3.8 6.9 0.55
scoped_resource gen 3.8 6.9 0.55
control_flow gen 3.9 7.1 0.56
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
asdl_generated gen 0 12 0.000
fib_recursive gen 0 12 0.000
files gen 0 4 0.000
loops gen 0 4 0.000
parse gen 0 8 0.000
containers gen 5 28 0.171
gc_stack_roots gen 2 8 0.208
scoped_resource gen 4 16 0.247
fib_iter gen 4 8 0.473
control_flow gen 4 8 0.498
tuple_return_value gen 4 8 0.507
length gen 4 8 0.515
varargs gen 46 52 0.876
escape gen 4 4 0.990
cartesian gen 12 8 1.455
classes gen 3 0 inf
modules gen 2 0 inf
cgi gen 0 0 NA

raw benchmark files