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
loops gen 0 290 0.000
fib_iter gen 8 888 0.008
modules gen 2 175 0.010
fib_recursive gen 11 879 0.012
asdl_generated gen 11 383 0.028
parse gen 29 782 0.038
scoped_resource gen 47 1,033 0.046
tuple_return_value gen 12 180 0.067
containers gen 12 131 0.089
files gen 7 72 0.103
length gen 33 206 0.159
classes gen 3 15 0.209
cartesian gen 91 329 0.277
escape gen 96 347 0.277
cgi gen 269 515 0.522
varargs gen 20 17 1.163
control_flow gen 209 111 1.883

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.5 0.41
parse gen 3.8 7.7 0.49
asdl_generated gen 3.5 6.9 0.51
escape gen 3.5 6.9 0.51
gc_stack_roots gen 3.5 6.9 0.51
scoped_resource gen 3.5 6.9 0.51
modules gen 3.7 7.1 0.52
tuple_return_value gen 3.7 7.1 0.52
cartesian gen 3.7 6.9 0.53
fib_iter gen 3.7 6.9 0.53
files gen 3.8 7.1 0.54
loops gen 3.8 7.1 0.54
length gen 3.7 6.8 0.54
cgi gen 3.8 6.8 0.56
control_flow gen 3.9 6.9 0.57
fib_recursive gen 3.9 6.9 0.57
containers gen 28.6 48.0 0.60
varargs gen 5.6 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ Python C++ : Python
cartesian gen 0 4 0.000
cgi gen 0 4 0.000
classes gen 0 15 0.000
control_flow gen 0 4 0.000
fib_iter gen 0 8 0.000
fib_recursive gen 0 8 0.000
files gen 0 4 0.000
modules gen 0 8 0.000
parse gen 0 4 0.000
scoped_resource gen 0 8 0.000
containers gen 4 28 0.140
gc_stack_roots gen 2 4 0.450
tuple_return_value gen 8 12 0.675
varargs gen 47 55 0.859
loops gen 4 4 0.942
escape gen 8 8 1.005
length gen 12 4 3.039
asdl_generated gen 0 0 NA

raw benchmark files