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 883 0.004
modules 2 194 0.009
fib_recursive 11 872 0.012
loops 4 295 0.013
asdl_generated 11 381 0.028
containers 4 114 0.033
parse 26 763 0.034
scoped_resource 43 1,031 0.042
files 4 68 0.054
tuple_return_value 20 211 0.095
classes 3 26 0.122
length 37 203 0.180
cartesian 92 320 0.288
escape 106 340 0.312
cgi 269 506 0.531
varargs 19 23 0.857
control_flow 205 111 1.852

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.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
cgi 3.5 6.8 0.52
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
loops 3.8 7.1 0.54
files 3.8 6.9 0.55
modules 3.8 6.9 0.55
tuple_return_value 3.9 7.1 0.56
length 3.8 6.8 0.56
control_flow 3.9 6.9 0.57
fib_iter 3.9 6.9 0.57
containers 28.7 47.7 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
cartesian 0 8 0.000
cgi 0 12 0.000
classes 0 4 0.000
escape 0 8 0.000
fib_recursive 0 8 0.000
loops 0 8 0.000
modules 0 8 0.000
tuple_return_value 0 4 0.000
scoped_resource 4 12 0.329
files 4 8 0.461
containers 11 25 0.467
fib_iter 4 8 0.471
parse 4 8 0.542
varargs 47 49 0.949
length 8 8 1.002
control_flow 4 4 1.017

raw benchmark files