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 27 0.000
loops gen 0 297 0.000
fib_iter gen 8 888 0.009
modules gen 2 174 0.010
fib_recursive gen 11 876 0.013
asdl_generated gen 11 394 0.027
parse gen 26 775 0.033
containers gen 4 100 0.039
scoped_resource gen 47 1,035 0.045
tuple_return_value gen 12 187 0.065
files gen 7 64 0.117
gc_stack_roots gen 2 8 0.214
length gen 44 202 0.219
cartesian gen 82 322 0.257
escape gen 106 348 0.306
cgi gen 257 510 0.503
varargs gen 27 20 1.364
control_flow gen 206 105 1.960

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
parse gen 3.8 7.7 0.49
fib_iter gen 3.5 6.9 0.51
scoped_resource gen 3.7 7.1 0.52
cartesian gen 3.5 6.8 0.52
gc_stack_roots gen 3.5 6.8 0.52
asdl_generated gen 3.7 6.9 0.53
modules gen 3.7 6.9 0.53
length gen 3.8 7.1 0.54
loops gen 3.8 7.1 0.54
cgi gen 3.7 6.8 0.54
escape gen 3.7 6.8 0.54
fib_recursive gen 3.8 6.9 0.55
files gen 3.8 6.9 0.55
tuple_return_value gen 3.8 6.8 0.56
control_flow gen 3.9 6.9 0.57
containers gen 28.5 47.8 0.59
varargs gen 5.4 7.1 0.76

System Time (milliseconds)

Lower ratios are better.

example name gen C++ Python C++ : Python
asdl_generated gen 0 8 0.000
cgi gen 0 4 0.000
escape gen 0 8 0.000
fib_iter gen 0 12 0.000
fib_recursive gen 0 8 0.000
files gen 0 12 0.000
gc_stack_roots gen 0 4 0.000
length gen 0 8 0.000
modules gen 0 8 0.000
containers gen 12 36 0.329
parse gen 4 8 0.457
control_flow gen 4 8 0.500
varargs gen 39 52 0.749
classes gen 3 4 0.849
cartesian gen 8 8 0.977
tuple_return_value gen 8 8 1.014
loops gen 4 0 inf
scoped_resource gen 0 0 NA

raw benchmark files