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 284 0.000
fib_iter 4 905 0.004
fib_recursive 7 883 0.008
modules 2 174 0.010
asdl_generated 11 388 0.028
parse 26 778 0.034
containers 4 114 0.034
scoped_resource 44 1,013 0.043
tuple_return_value 13 187 0.072
files 7 67 0.111
classes 3 19 0.167
length 45 205 0.222
cartesian 91 328 0.276
escape 98 347 0.282
cgi 254 515 0.493
control_flow 208 105 1.979
varargs 21 8 2.612

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
cgi 3.5 6.9 0.51
fib_recursive 3.5 6.9 0.51
parse 3.9 7.6 0.52
cartesian 3.5 6.8 0.52
loops 3.8 7.2 0.53
asdl_generated 3.7 6.9 0.53
escape 3.7 6.9 0.53
modules 3.7 6.9 0.53
length 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
fib_iter 3.8 6.9 0.55
files 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
control_flow 3.9 7.1 0.56
containers 28.7 47.8 0.60
varargs 5.5 6.8 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 4 0.000
classes 0 12 0.000
control_flow 0 8 0.000
files 0 8 0.000
length 0 4 0.000
modules 0 8 0.000
loops 4 12 0.314
scoped_resource 4 12 0.331
parse 4 8 0.467
fib_iter 4 8 0.474
containers 12 20 0.570
escape 8 12 0.655
varargs 46 64 0.718
tuple_return_value 7 8 0.831
fib_recursive 4 0 inf

raw benchmark files