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 4 897 0.004
modules 2 178 0.010
loops 4 329 0.011
fib_recursive 11 885 0.012
asdl_generated 7 383 0.019
scoped_resource 39 1,044 0.037
containers 4 102 0.038
parse 30 763 0.039
files 4 65 0.058
tuple_return_value 16 186 0.086
classes 3 27 0.121
length 32 210 0.152
cartesian 87 330 0.265
escape 102 342 0.299
cgi 261 514 0.507
control_flow 213 111 1.913
varargs 15 8 1.936

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.6 0.41
parse 3.8 7.5 0.51
escape 3.5 6.9 0.51
loops 3.8 7.2 0.53
asdl_generated 3.7 6.9 0.53
cgi 3.7 6.9 0.53
files 3.7 6.9 0.53
length 3.7 6.9 0.53
scoped_resource 3.8 7.1 0.54
cartesian 3.8 6.9 0.55
control_flow 3.8 6.9 0.55
fib_iter 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
modules 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
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
classes 0 4 0.000
control_flow 0 4 0.000
fib_recursive 0 8 0.000
loops 0 4 0.000
modules 0 4 0.000
parse 0 12 0.000
files 4 12 0.308
containers 11 37 0.314
fib_iter 4 8 0.470
cartesian 4 8 0.494
tuple_return_value 4 8 0.497
escape 4 8 0.515
varargs 50 64 0.786
cgi 8 4 1.998
scoped_resource 9 4 2.157
asdl_generated 4 0 inf
length 12 0 inf

raw benchmark files