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 26 0.000
containers 0 102 0.000
fib_iter 7 886 0.008
modules 2 180 0.010
fib_recursive 11 892 0.012
loops 4 303 0.012
asdl_generated 7 382 0.019
parse 30 774 0.039
scoped_resource 48 1,026 0.046
files 4 67 0.055
tuple_return_value 12 184 0.065
length 41 203 0.201
cartesian 78 349 0.224
escape 102 346 0.295
cgi 266 513 0.518
varargs 20 24 0.828
control_flow 210 111 1.885

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
asdl_generated 3.5 7.1 0.50
cartesian 3.5 7.1 0.50
parse 3.9 7.5 0.53
cgi 3.7 6.9 0.53
scoped_resource 3.7 6.9 0.53
fib_recursive 3.8 7.1 0.54
files 3.8 7.1 0.54
loops 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
escape 3.7 6.8 0.54
fib_iter 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 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
control_flow 0 4 0.000
fib_iter 0 8 0.000
fib_recursive 0 4 0.000
loops 0 4 0.000
modules 0 4 0.000
parse 0 8 0.000
scoped_resource 0 4 0.000
files 4 8 0.471
containers 15 31 0.481
escape 4 8 0.487
length 4 8 0.512
classes 3 4 0.731
asdl_generated 4 4 0.886
cgi 4 4 0.990
varargs 47 48 0.993
tuple_return_value 8 8 0.994
cartesian 12 8 1.539

raw benchmark files