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 26 0.000
fib_iter 4 885 0.004
modules 2 176 0.010
fib_recursive 11 932 0.012
loops 4 293 0.013
asdl_generated 11 372 0.030
scoped_resource 39 1,030 0.038
parse 30 782 0.038
containers 12 116 0.104
tuple_return_value 20 193 0.106
files 7 64 0.116
length 32 200 0.161
cartesian 79 338 0.234
escape 94 346 0.271
cgi 265 515 0.514
varargs 16 12 1.300
control_flow 209 115 1.809

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
parse 3.8 7.6 0.50
asdl_generated 3.5 6.9 0.51
fib_iter 3.5 6.9 0.51
cgi 3.7 7.1 0.52
cartesian 3.7 6.9 0.53
escape 3.7 6.9 0.53
scoped_resource 3.7 6.9 0.53
control_flow 3.8 7.1 0.54
fib_recursive 3.8 7.1 0.54
loops 3.8 7.1 0.54
modules 3.7 6.8 0.54
files 3.8 6.9 0.55
length 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
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
asdl_generated 0 12 0.000
fib_recursive 0 4 0.000
files 0 11 0.000
loops 0 4 0.000
modules 0 8 0.000
parse 0 12 0.000
containers 4 20 0.202
fib_iter 4 8 0.472
scoped_resource 8 12 0.653
classes 3 4 0.758
varargs 51 61 0.845
cartesian 12 12 0.994
length 12 8 1.513
escape 12 4 3.040
cgi 4 0 inf
control_flow 0 0 NA
tuple_return_value 0 0 NA

raw benchmark files