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 16 0.000
fib_recursive 7 878 0.008
fib_iter 8 902 0.008
modules 2 182 0.010
loops 4 301 0.012
asdl_generated 7 379 0.019
containers 4 114 0.034
parse 29 754 0.039
scoped_resource 44 1,026 0.043
files 7 68 0.108
tuple_return_value 20 185 0.109
length 45 206 0.218
cartesian 83 322 0.258
varargs 8 28 0.281
escape 102 354 0.288
cgi 268 504 0.533
control_flow 207 113 1.834

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.7 0.41
parse 3.9 7.7 0.51
loops 3.7 7.2 0.51
cartesian 3.5 6.9 0.51
escape 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
cgi 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
files 3.7 6.9 0.53
modules 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
fib_recursive 3.8 6.9 0.55
length 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
containers 28.5 47.7 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 12 0.000
files 0 8 0.000
length 0 4 0.000
parse 0 4 0.000
tuple_return_value 0 8 0.000
classes 3 16 0.209
asdl_generated 4 12 0.308
fib_recursive 4 8 0.444
scoped_resource 4 8 0.502
containers 12 20 0.565
cartesian 8 8 0.995
varargs 59 44 1.339
escape 4 0 inf
control_flow 0 0 NA
fib_iter 0 0 NA
loops 0 0 NA
modules 0 0 NA

raw benchmark files