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
loops 0 292 0.000
fib_iter 8 904 0.008
modules 2 177 0.010
fib_recursive 11 882 0.012
parse 17 766 0.022
asdl_generated 11 384 0.028
scoped_resource 40 1,027 0.039
tuple_return_value 20 192 0.105
files 7 67 0.109
containers 16 108 0.146
classes 3 19 0.169
length 41 202 0.202
cartesian 84 330 0.253
escape 100 353 0.283
cgi 265 527 0.503
control_flow 209 108 1.939
varargs 27 12 2.278

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_iter 3.4 6.9 0.49
asdl_generated 3.5 6.9 0.51
files 3.5 6.9 0.51
parse 3.9 7.6 0.52
scoped_resource 3.7 7.1 0.52
cartesian 3.7 6.9 0.53
cgi 3.7 6.9 0.53
escape 3.7 6.9 0.53
length 3.7 6.9 0.53
loops 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
control_flow 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
modules 3.9 6.9 0.57
containers 28.7 47.8 0.60
varargs 5.6 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 4 0.000
classes 0 11 0.000
containers 0 28 0.000
control_flow 0 8 0.000
fib_recursive 0 8 0.000
files 0 8 0.000
modules 0 8 0.000
tuple_return_value 0 8 0.000
length 4 8 0.514
varargs 39 60 0.651
scoped_resource 8 8 0.991
cgi 4 4 0.991
cartesian 8 8 1.001
parse 13 12 1.050
loops 4 4 1.053
escape 8 0 inf
fib_iter 0 0 NA

raw benchmark files