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 894 0.008
modules 2 179 0.011
fib_recursive 11 877 0.012
loops 4 300 0.013
asdl_generated 5 377 0.014
parse 29 761 0.038
scoped_resource 39 1,019 0.038
files 4 69 0.054
tuple_return_value 20 185 0.109
classes 3 23 0.142
containers 16 102 0.155
length 44 202 0.217
cartesian 78 347 0.224
escape 100 342 0.293
cgi 258 569 0.453
control_flow 210 114 1.848
varargs 29 8 3.583

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.7 0.41
escape 3.5 6.9 0.51
parse 3.9 7.6 0.52
scoped_resource 3.7 7.1 0.52
loops 3.8 7.2 0.53
cgi 3.7 6.9 0.53
files 3.7 6.9 0.53
length 3.7 6.9 0.53
modules 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
cartesian 3.8 7.1 0.54
asdl_generated 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
control_flow 3.8 6.8 0.56
fib_iter 3.8 6.8 0.56
containers 28.7 47.8 0.60
varargs 5.2 6.9 0.75

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
classes 0 8 0.000
containers 0 39 0.000
fib_iter 0 16 0.000
fib_recursive 0 8 0.000
length 0 8 0.000
loops 0 4 0.000
modules 0 4 0.000
parse 0 4 0.000
tuple_return_value 0 12 0.000
files 4 8 0.484
varargs 37 64 0.576
escape 8 12 0.665
cgi 8 8 1.012
asdl_generated 5 4 1.340
scoped_resource 8 4 1.945
cartesian 12 4 2.930
control_flow 0 0 NA

raw benchmark files