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 27 0.000
fib_recursive 7 919 0.008
fib_iter 8 877 0.009
modules 2 176 0.010
loops 4 293 0.014
asdl_generated 11 392 0.028
parse 25 769 0.033
containers 4 104 0.038
scoped_resource 43 1,042 0.041
files 4 68 0.057
tuple_return_value 20 194 0.103
length 40 206 0.195
cartesian 82 345 0.238
escape 107 356 0.302
cgi 263 511 0.515
varargs 23 12 1.924
control_flow 207 105 1.970

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
parse 3.7 7.6 0.48
cartesian 3.5 6.9 0.51
cgi 3.7 7.1 0.52
escape 3.5 6.8 0.52
fib_iter 3.7 6.9 0.53
scoped_resource 3.7 6.9 0.53
loops 3.8 7.1 0.54
modules 3.8 7.1 0.54
asdl_generated 3.7 6.8 0.54
control_flow 3.8 6.9 0.55
files 3.8 6.9 0.55
length 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
fib_recursive 3.9 6.9 0.57
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
asdl_generated 0 8 0.000
fib_iter 0 16 0.000
loops 0 8 0.000
modules 0 12 0.000
cgi 4 12 0.333
containers 12 32 0.372
files 4 8 0.488
control_flow 4 8 0.492
varargs 42 60 0.706
classes 3 4 0.855
fib_recursive 4 4 0.906
scoped_resource 4 4 0.980
length 4 4 1.012
parse 4 4 1.053
cartesian 8 0 inf
escape 0 0 NA
tuple_return_value 0 0 NA

raw benchmark files