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
modules 0 176 0.000
fib_iter 8 900 0.008
fib_recursive 11 895 0.012
loops 4 292 0.013
asdl_generated 5 371 0.014
parse 30 766 0.039
scoped_resource 47 1,023 0.046
containers 8 100 0.077
tuple_return_value 20 194 0.104
files 7 65 0.113
classes 3 23 0.142
length 44 203 0.215
cartesian 81 326 0.248
escape 106 348 0.304
cgi 253 516 0.490
varargs 12 12 0.968
control_flow 210 112 1.872

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.2 10.8 0.39
asdl_generated 3.5 7.1 0.50
parse 3.8 7.6 0.50
cartesian 3.5 6.9 0.51
cgi 3.5 6.9 0.51
escape 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
fib_iter 3.7 6.9 0.53
length 3.7 6.9 0.53
loops 3.8 7.1 0.54
fib_recursive 3.7 6.8 0.54
files 3.8 6.9 0.55
modules 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
containers 28.5 47.7 0.60
varargs 5.6 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 4 0.000
classes 0 8 0.000
control_flow 0 4 0.000
escape 0 8 0.000
fib_iter 0 4 0.000
fib_recursive 0 12 0.000
files 0 11 0.000
length 0 4 0.000
loops 0 4 0.000
parse 0 12 0.000
scoped_resource 0 8 0.000
tuple_return_value 0 4 0.000
containers 8 36 0.214
modules 2 8 0.226
asdl_generated 5 8 0.670
varargs 54 60 0.903
cartesian 8 8 1.019

raw benchmark files