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 C++ Python C++ : Python
fib_iter 8 887 0.009
modules 2 188 0.011
fib_recursive 11 887 0.013
loops 4 291 0.013
asdl_generated 7 373 0.019
parse 26 765 0.034
scoped_resource 47 1,041 0.045
tuple_return_value 17 188 0.090
containers 8 88 0.093
files 8 73 0.106
classes 3 27 0.118
length 34 208 0.161
escape 86 352 0.246
cartesian 90 324 0.277
cgi 263 511 0.515
varargs 24 20 1.175
control_flow 208 113 1.836

Max Resident Set Size (MB)

Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).

example name C++ Python C++ : Python
classes 4.5 10.7 0.41
escape 3.5 7.1 0.50
parse 3.8 7.6 0.50
fib_recursive 3.5 6.9 0.51
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
modules 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
length 3.8 7.1 0.54
loops 3.8 7.1 0.54
cgi 3.7 6.8 0.54
fib_iter 3.8 6.9 0.55
files 3.8 6.9 0.55
scoped_resource 3.8 6.9 0.55
control_flow 3.8 6.8 0.56
containers 28.6 47.8 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cartesian 0 8 0.000
classes 0 4 0.000
control_flow 0 4 0.000
fib_iter 0 8 0.000
fib_recursive 0 8 0.000
files 0 4 0.000
loops 0 12 0.000
modules 0 4 0.000
scoped_resource 0 8 0.000
containers 8 48 0.170
tuple_return_value 3 8 0.424
asdl_generated 4 8 0.450
parse 4 8 0.462
varargs 43 52 0.829
cgi 8 8 1.000
length 11 4 2.792
escape 20 4 4.919

raw benchmark files