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 293 0.000
fib_iter 8 898 0.008
asdl_generated 4 391 0.009
modules 2 175 0.010
fib_recursive 11 885 0.012
scoped_resource 36 1,022 0.035
parse 27 769 0.035
files 4 68 0.055
containers 12 118 0.098
tuple_return_value 20 191 0.105
classes 3 23 0.141
length 37 200 0.186
cartesian 83 321 0.258
escape 90 342 0.264
cgi 272 506 0.536
varargs 16 15 1.017
control_flow 204 115 1.770

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
asdl_generated 3.5 6.9 0.51
cartesian 3.5 6.9 0.51
parse 3.9 7.6 0.52
modules 3.7 7.1 0.52
cgi 3.5 6.8 0.52
escape 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
files 3.7 6.9 0.53
scoped_resource 3.7 6.9 0.53
loops 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
length 3.8 6.8 0.56
control_flow 3.9 6.9 0.57
containers 28.8 47.8 0.60
varargs 5.4 6.9 0.78

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 4 0.000
classes 0 8 0.000
fib_iter 0 8 0.000
fib_recursive 0 4 0.000
modules 0 12 0.000
containers 4 20 0.195
loops 4 8 0.453
files 4 8 0.466
parse 4 8 0.483
varargs 51 58 0.881
asdl_generated 7 8 0.895
length 7 8 0.930
cartesian 8 8 0.995
scoped_resource 12 8 1.484
escape 16 8 1.974
control_flow 4 0 inf
tuple_return_value 0 0 NA

raw benchmark files