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 23 0.000
containers 0 100 0.000
loops 0 294 0.000
fib_recursive 7 877 0.008
fib_iter 8 885 0.009
modules 2 177 0.010
asdl_generated 11 379 0.028
parse 22 765 0.029
scoped_resource 43 1,036 0.041
tuple_return_value 16 179 0.090
files 7 68 0.109
length 37 203 0.183
cartesian 82 325 0.254
escape 103 346 0.299
cgi 265 506 0.523
varargs 19 16 1.226
control_flow 210 107 1.965

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.9 0.41
parse 3.7 7.7 0.47
loops 3.5 7.2 0.49
scoped_resource 3.5 7.1 0.50
cartesian 3.5 6.9 0.51
cgi 3.7 7.1 0.52
escape 3.7 6.9 0.53
files 3.7 6.9 0.53
modules 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
fib_recursive 3.8 7.1 0.54
asdl_generated 3.7 6.8 0.54
fib_iter 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 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 4 0.000
control_flow 0 8 0.000
fib_iter 0 8 0.000
files 0 8 0.000
modules 0 4 0.000
fib_recursive 4 12 0.300
scoped_resource 4 12 0.325
tuple_return_value 4 12 0.337
classes 3 8 0.417
containers 15 36 0.424
escape 4 8 0.500
cgi 4 8 0.503
varargs 47 56 0.841
loops 4 4 1.003
cartesian 8 8 1.027
parse 7 4 1.863
length 7 4 1.869

raw benchmark files