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
classes 0 15 0.000
fib_iter 4 893 0.004
modules 2 169 0.011
fib_recursive 11 882 0.012
loops 4 286 0.013
asdl_generated 11 385 0.028
parse 25 770 0.033
containers 4 105 0.036
scoped_resource 43 1,018 0.042
files 8 69 0.110
tuple_return_value 20 180 0.111
length 40 206 0.196
cartesian 91 340 0.268
escape 98 338 0.291
cgi 268 511 0.524
control_flow 208 111 1.872
varargs 12 0 inf

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
cgi 3.5 7.1 0.50
parse 3.8 7.6 0.50
escape 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
control_flow 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
length 3.7 6.9 0.53
loops 3.8 7.1 0.54
files 3.8 6.9 0.55
modules 3.8 6.9 0.55
scoped_resource 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
fib_recursive 3.9 6.9 0.57
containers 28.5 48.0 0.59
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
cartesian 0 8 0.000
cgi 0 8 0.000
control_flow 0 8 0.000
fib_recursive 0 12 0.000
files 0 8 0.000
loops 0 12 0.000
modules 0 12 0.000
tuple_return_value 0 12 0.000
classes 3 15 0.209
scoped_resource 4 12 0.325
containers 11 28 0.404
parse 4 8 0.528
varargs 55 71 0.767
fib_iter 4 4 0.947
escape 8 8 0.977
length 4 4 1.020

raw benchmark files