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 8 891 0.009
modules 2 174 0.011
fib_recursive 11 888 0.012
loops 4 296 0.013
asdl_generated 11 369 0.030
parse 30 791 0.038
scoped_resource 48 1,048 0.045
containers 10 108 0.095
files 7 69 0.107
tuple_return_value 20 187 0.109
classes 4 20 0.192
length 41 204 0.201
cartesian 86 360 0.238
escape 91 352 0.258
varargs 12 29 0.411
cgi 269 508 0.530
control_flow 209 105 1.986

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.6 10.9 0.42
parse 3.9 7.7 0.51
cartesian 3.5 6.9 0.51
modules 3.5 6.9 0.51
asdl_generated 3.7 7.1 0.52
scoped_resource 3.8 7.2 0.53
length 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
loops 3.8 7.1 0.54
cgi 3.7 6.8 0.54
fib_recursive 3.7 6.8 0.54
escape 3.8 6.9 0.55
fib_iter 3.8 6.9 0.55
files 3.8 6.9 0.55
control_flow 3.9 7.1 0.56
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 12 0.000
cgi 0 4 0.000
classes 0 12 0.000
control_flow 0 8 0.000
fib_recursive 0 8 0.000
files 0 8 0.000
modules 0 8 0.000
parse 0 4 0.000
scoped_resource 0 8 0.000
tuple_return_value 0 8 0.000
containers 5 28 0.184
length 4 4 1.024
varargs 55 45 1.222
escape 16 4 3.952
cartesian 4 0 inf
fib_iter 0 0 NA
loops 0 0 NA

raw benchmark files