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
classes 0 19 0.000
fib_iter 8 889 0.009
modules 2 178 0.010
fib_recursive 11 878 0.012
loops 4 288 0.013
asdl_generated 11 376 0.029
parse 26 759 0.034
scoped_resource 43 1,006 0.043
files 4 65 0.058
containers 12 114 0.105
tuple_return_value 20 187 0.109
length 41 206 0.200
cartesian 75 333 0.224
escape 95 352 0.271
cgi 265 515 0.515
varargs 21 20 1.031
control_flow 202 108 1.878

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.9 0.41
fib_recursive 3.5 7.1 0.50
parse 3.8 7.6 0.50
asdl_generated 3.5 6.9 0.51
cgi 3.5 6.9 0.51
scoped_resource 3.7 7.1 0.52
cartesian 3.7 6.9 0.53
escape 3.7 6.9 0.53
length 3.7 6.9 0.53
modules 3.7 6.9 0.53
control_flow 3.8 7.1 0.54
loops 3.8 7.1 0.54
fib_iter 3.8 6.9 0.55
files 3.8 6.9 0.55
tuple_return_value 3.8 6.8 0.56
containers 28.3 47.8 0.59
varargs 5.6 6.8 0.83

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 4 0.000
fib_iter 0 8 0.000
fib_recursive 0 4 0.000
loops 0 8 0.000
modules 0 4 0.000
tuple_return_value 0 4 0.000
containers 4 20 0.195
classes 3 12 0.276
scoped_resource 4 12 0.327
files 4 11 0.328
parse 4 8 0.538
varargs 46 52 0.872
cgi 4 4 1.006
length 4 4 1.040
cartesian 16 8 1.958
control_flow 8 4 1.988
escape 12 4 2.981

raw benchmark files