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 24 0.000
containers 0 114 0.000
fib_iter 8 905 0.008
modules 2 170 0.010
fib_recursive 11 876 0.012
loops 4 305 0.014
asdl_generated 7 379 0.019
parse 29 756 0.039
scoped_resource 40 1,030 0.039
files 4 69 0.054
tuple_return_value 20 191 0.106
length 37 224 0.163
cartesian 87 327 0.266
escape 103 349 0.295
cgi 252 514 0.490
varargs 12 16 0.775
control_flow 208 104 2.005

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.2 10.9 0.39
fib_iter 3.5 7.1 0.50
parse 3.8 7.5 0.51
modules 3.5 6.9 0.51
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
cgi 3.7 6.9 0.53
escape 3.7 6.9 0.53
length 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
loops 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
fib_recursive 3.8 6.9 0.55
files 3.8 6.9 0.55
control_flow 3.9 7.1 0.56
containers 28.4 47.8 0.59
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
control_flow 0 12 0.000
fib_iter 0 8 0.000
fib_recursive 0 8 0.000
loops 0 4 0.000
modules 0 12 0.000
parse 0 16 0.000
tuple_return_value 0 4 0.000
escape 4 12 0.329
cgi 4 12 0.335
cartesian 4 12 0.346
classes 4 8 0.463
files 4 8 0.489
containers 15 24 0.648
asdl_generated 4 4 0.897
scoped_resource 7 8 0.917
varargs 54 56 0.959
length 8 0 inf

raw benchmark files