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 23 0.000
modules 2 176 0.010
fib_iter 10 897 0.011
fib_recursive 11 920 0.012
loops 5 292 0.018
asdl_generated 8 379 0.021
parse 23 763 0.030
scoped_resource 40 1,033 0.039
containers 8 116 0.066
tuple_return_value 20 188 0.107
files 8 71 0.114
length 32 207 0.155
escape 96 354 0.271
cartesian 89 323 0.274
cgi 263 500 0.526
varargs 16 24 0.660
control_flow 209 111 1.881

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
escape 3.4 6.9 0.49
parse 3.8 7.6 0.50
loops 3.7 7.2 0.51
cgi 3.5 6.9 0.51
cartesian 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
files 3.7 6.9 0.53
modules 3.7 6.9 0.53
tuple_return_value 3.8 7.1 0.54
scoped_resource 3.8 6.9 0.55
control_flow 3.7 6.7 0.55
fib_iter 3.8 6.8 0.56
length 3.9 6.9 0.57
containers 28.5 47.8 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
control_flow 0 4 0.000
fib_recursive 0 4 0.000
files 0 8 0.000
loops 0 4 0.000
modules 0 8 0.000
tuple_return_value 0 4 0.000
asdl_generated 4 12 0.332
cgi 4 12 0.332
cartesian 4 12 0.337
containers 8 20 0.384
classes 4 8 0.487
parse 8 12 0.644
varargs 51 48 1.072
escape 12 4 2.986
length 12 4 3.025
scoped_resource 8 0 inf
fib_iter 0 0 NA

raw benchmark files