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 881 0.009
asdl_generated 4 381 0.009
modules 2 167 0.011
fib_recursive 10 918 0.011
loops 4 282 0.013
containers 4 94 0.038
parse 29 725 0.040
scoped_resource 48 980 0.049
files 4 68 0.054
tuple_return_value 20 190 0.103
classes 3 19 0.156
length 38 187 0.204
cartesian 72 313 0.231
escape 97 343 0.282
cgi 256 501 0.510
varargs 25 20 1.259
control_flow 194 101 1.915

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.8 0.41
asdl_generated 3.5 7.1 0.50
parse 3.8 7.6 0.50
cartesian 3.5 6.9 0.51
loops 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
cgi 3.7 6.9 0.53
escape 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
length 3.7 6.9 0.53
control_flow 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
fib_iter 3.8 6.9 0.55
files 3.8 6.9 0.55
modules 3.8 6.9 0.55
containers 28.6 47.8 0.60
varargs 5.5 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 8 0.000
classes 0 11 0.000
fib_iter 0 4 0.000
fib_recursive 0 8 0.000
loops 0 8 0.000
modules 0 4 0.000
parse 0 8 0.000
scoped_resource 0 16 0.000
tuple_return_value 0 4 0.000
containers 11 31 0.343
length 4 12 0.355
files 4 8 0.462
escape 4 8 0.499
control_flow 4 8 0.508
varargs 38 48 0.787
cartesian 12 8 1.503
asdl_generated 7 4 1.773

raw benchmark files