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
files 0 72 0.000
fib_iter 8 897 0.008
modules 2 191 0.009
fib_recursive 11 887 0.012
loops 4 296 0.013
asdl_generated 5 376 0.014
parse 26 770 0.033
scoped_resource 39 1,035 0.038
containers 8 109 0.071
tuple_return_value 20 183 0.111
classes 3 15 0.211
length 45 195 0.229
cartesian 87 325 0.268
escape 98 352 0.280
varargs 8 24 0.325
cgi 266 515 0.516
control_flow 218 99 2.191

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.3 10.8 0.40
scoped_resource 3.4 7.1 0.48
fib_iter 3.5 7.1 0.50
length 3.5 7.1 0.50
cartesian 3.5 6.9 0.51
parse 3.9 7.6 0.52
asdl_generated 3.7 6.9 0.53
cgi 3.7 6.9 0.53
control_flow 3.7 6.9 0.53
escape 3.7 6.9 0.53
loops 3.8 7.1 0.54
modules 3.8 7.1 0.54
fib_recursive 3.8 6.9 0.55
files 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
containers 28.5 47.8 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 8 0.000
classes 0 15 0.000
control_flow 0 12 0.000
fib_iter 0 8 0.000
length 0 12 0.000
loops 0 4 0.000
modules 0 4 0.000
tuple_return_value 0 12 0.000
containers 8 28 0.272
cartesian 4 12 0.332
parse 4 8 0.455
varargs 58 48 1.219
asdl_generated 5 4 1.334
scoped_resource 8 4 1.958
files 8 4 1.969
escape 8 0 inf
fib_recursive 0 0 NA

raw benchmark files