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 4 895 0.004
fib_recursive 7 880 0.008
modules 2 183 0.009
loops 4 297 0.014
asdl_generated 5 374 0.014
parse 25 760 0.033
scoped_resource 43 1,017 0.043
files 8 75 0.102
tuple_return_value 20 192 0.105
containers 11 107 0.107
classes 3 27 0.122
length 45 203 0.222
cartesian 75 333 0.224
escape 105 337 0.310
cgi 271 502 0.539
varargs 12 21 0.552
control_flow 227 113 2.012

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.6 0.42
fib_recursive 3.5 7.1 0.50
parse 3.9 7.7 0.51
cartesian 3.5 6.9 0.51
cgi 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
escape 3.7 6.9 0.53
length 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
scoped_resource 3.8 7.1 0.54
loops 3.9 7.2 0.55
control_flow 3.8 6.9 0.55
files 3.8 6.9 0.55
modules 3.8 6.9 0.55
fib_iter 3.9 7.1 0.56
containers 28.5 47.7 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 12 0.000
classes 0 4 0.000
files 0 8 0.000
length 0 8 0.000
loops 0 8 0.000
modules 0 8 0.000
tuple_return_value 0 4 0.000
containers 4 29 0.133
scoped_resource 4 12 0.327
escape 4 12 0.334
fib_recursive 4 8 0.446
asdl_generated 5 8 0.667
parse 4 4 1.043
varargs 54 50 1.074
cartesian 16 4 3.911
fib_iter 4 0 inf
control_flow 0 0 NA

raw benchmark files