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
containers 0 117 0.000
fib_iter 4 1,071 0.004
modules 2 176 0.012
fib_recursive 11 891 0.012
loops 4 293 0.012
asdl_generated 8 369 0.021
scoped_resource 40 1,042 0.038
parse 31 746 0.041
tuple_return_value 21 189 0.109
files 8 66 0.115
classes 3 24 0.137
length 40 208 0.192
cartesian 82 323 0.255
escape 95 344 0.277
cgi 269 511 0.526
varargs 20 27 0.727
control_flow 209 114 1.840

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.6 0.42
modules 3.4 6.9 0.49
scoped_resource 3.5 7.1 0.50
escape 3.5 6.9 0.51
parse 3.9 7.6 0.52
cgi 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
fib_iter 3.8 7.1 0.54
loops 3.8 7.1 0.54
files 3.8 6.9 0.55
length 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
fib_recursive 3.8 6.8 0.56
control_flow 3.9 6.9 0.57
containers 28.6 47.8 0.60
varargs 5.5 6.8 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
fib_recursive 0 8 0.000
files 0 12 0.000
loops 0 8 0.000
modules 0 8 0.000
parse 0 16 0.000
tuple_return_value 0 8 0.000
asdl_generated 4 12 0.319
containers 16 20 0.804
length 4 4 1.000
varargs 47 46 1.017
fib_iter 4 4 1.019
cartesian 8 8 1.019
escape 12 8 1.489
scoped_resource 8 4 1.972

raw benchmark files