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 22 0.000
fib_iter 4 891 0.004
modules 2 171 0.011
loops 4 294 0.012
fib_recursive 11 869 0.012
asdl_generated 7 380 0.019
parse 25 769 0.033
containers 4 114 0.035
scoped_resource 48 1,041 0.046
files 4 72 0.053
tuple_return_value 16 191 0.086
length 45 206 0.217
cartesian 86 318 0.270
escape 102 345 0.295
cgi 254 509 0.500
varargs 12 11 1.085
control_flow 211 110 1.923

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
parse 3.8 7.6 0.50
escape 3.5 6.9 0.51
asdl_generated 3.7 7.1 0.52
loops 3.7 7.1 0.52
cartesian 3.7 6.9 0.53
cgi 3.7 6.9 0.53
length 3.7 6.9 0.53
modules 3.8 7.1 0.54
fib_iter 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
files 3.8 6.9 0.55
scoped_resource 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
containers 28.4 47.8 0.59
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 4 0.000
control_flow 0 12 0.000
fib_recursive 0 12 0.000
loops 0 8 0.000
modules 0 12 0.000
scoped_resource 0 4 0.000
cartesian 4 12 0.343
classes 3 9 0.361
fib_iter 4 8 0.475
escape 4 8 0.494
parse 4 8 0.528
containers 12 20 0.604
varargs 54 61 0.881
asdl_generated 4 4 0.893
files 4 4 0.946
tuple_return_value 4 4 1.031
length 0 0 NA

raw benchmark files