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 8 896 0.008
modules 2 178 0.011
fib_recursive 11 991 0.011
loops 4 302 0.014
asdl_generated 7 371 0.019
parse 25 770 0.033
scoped_resource 48 1,030 0.046
files 4 73 0.052
tuple_return_value 16 196 0.083
containers 12 97 0.120
classes 3 23 0.141
length 36 207 0.174
cartesian 82 337 0.244
escape 102 343 0.298
cgi 269 518 0.519
varargs 40 24 1.658
control_flow 209 104 2.001

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
asdl_generated 3.5 7.1 0.50
loops 3.5 7.1 0.50
cartesian 3.5 6.9 0.51
parse 3.9 7.6 0.52
cgi 3.7 6.9 0.53
escape 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
control_flow 3.8 7.1 0.54
length 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
fib_iter 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
files 3.8 6.9 0.55
modules 3.9 6.9 0.57
containers 28.4 47.7 0.60
varargs 5.4 6.9 0.77

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 12 0.000
fib_iter 0 4 0.000
loops 0 4 0.000
modules 0 4 0.000
scoped_resource 0 8 0.000
containers 4 40 0.096
asdl_generated 4 12 0.302
escape 4 12 0.329
parse 4 12 0.354
varargs 28 48 0.580
files 4 4 0.937
length 8 4 2.011
cartesian 8 4 2.050
tuple_return_value 4 0 inf
fib_recursive 0 0 NA

raw benchmark files