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 4 0.000
modules gen 0 192 0.000
fib_recursive gen 7 885 0.008
fib_iter gen 8 915 0.008
loops gen 4 300 0.012
asdl_generated gen 11 396 0.027
parse gen 22 764 0.029
scoped_resource gen 43 1,027 0.042
tuple_return_value gen 20 190 0.106
files gen 8 64 0.119
containers gen 15 123 0.123
length gen 40 203 0.198
classes gen 3 15 0.208
cartesian gen 84 327 0.258
escape gen 107 346 0.308
cgi gen 271 505 0.536
varargs gen 24 20 1.180
control_flow gen 205 112 1.834

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 6.9 0.49
scoped_resource gen 3.5 7.1 0.50
parse gen 3.8 7.5 0.51
asdl_generated gen 3.5 6.9 0.51
cartesian gen 3.5 6.9 0.51
cgi gen 3.7 6.9 0.53
escape gen 3.7 6.9 0.53
files gen 3.7 6.9 0.53
loops gen 3.8 7.1 0.54
modules gen 3.8 7.1 0.54
control_flow gen 3.8 6.9 0.55
fib_recursive gen 3.8 6.9 0.55
length gen 3.8 6.9 0.55
tuple_return_value gen 3.8 6.9 0.55
fib_iter gen 3.9 6.9 0.57
containers gen 28.6 47.8 0.60
varargs gen 5.5 6.8 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ Python C++ : Python
asdl_generated gen 0 8 0.000
cgi gen 0 16 0.000
classes gen 0 15 0.000
containers gen 0 12 0.000
escape gen 0 8 0.000
fib_iter gen 0 8 0.000
files gen 0 12 0.000
tuple_return_value gen 0 4 0.000
gc_stack_roots gen 2 8 0.224
modules gen 2 4 0.438
varargs gen 43 52 0.832
parse gen 7 8 0.910
scoped_resource gen 4 4 0.987
length gen 4 4 1.010
cartesian gen 8 4 1.990
control_flow gen 4 0 inf
fib_recursive gen 4 0 inf
loops gen 0 0 NA

raw benchmark files