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 173 0.010
loops 4 305 0.012
fib_recursive 11 881 0.012
asdl_generated 11 381 0.028
containers 4 114 0.035
parse 29 764 0.039
scoped_resource 43 1,043 0.041
tuple_return_value 20 186 0.109
files 8 66 0.115
classes 3 24 0.136
length 34 207 0.163
cartesian 92 337 0.272
escape 102 358 0.284
cgi 269 509 0.527
varargs 27 20 1.357
control_flow 209 107 1.960

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
parse 3.7 7.7 0.47
scoped_resource 3.5 7.1 0.50
cartesian 3.5 6.9 0.51
fib_iter 3.5 6.9 0.51
asdl_generated 3.7 6.9 0.53
cgi 3.7 6.9 0.53
escape 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
loops 3.8 7.1 0.54
control_flow 3.8 6.9 0.55
files 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
tuple_return_value 3.8 6.8 0.56
containers 28.5 47.8 0.59
varargs 5.5 6.8 0.81

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 4 0.000
cartesian 0 4 0.000
cgi 0 12 0.000
classes 0 8 0.000
control_flow 0 8 0.000
fib_recursive 0 8 0.000
files 0 12 0.000
loops 0 4 0.000
modules 0 12 0.000
parse 0 8 0.000
tuple_return_value 0 8 0.000
scoped_resource 4 8 0.487
containers 12 24 0.508
varargs 39 52 0.745
escape 4 4 1.011
length 11 4 2.820
fib_iter 0 0 NA

raw benchmark files