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_recursive 7 879 0.008
fib_iter 8 893 0.009
modules 2 206 0.009
loops 4 306 0.012
asdl_generated 5 377 0.014
parse 26 778 0.033
scoped_resource 47 1,018 0.047
containers 10 113 0.092
tuple_return_value 20 189 0.106
files 8 67 0.112
length 33 205 0.161
classes 3 13 0.245
cartesian 90 340 0.266
escape 98 356 0.275
cgi 265 505 0.525
varargs 19 24 0.811
control_flow 205 107 1.914

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.9 7.6 0.52
escape 3.5 6.8 0.52
asdl_generated 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
modules 3.7 6.9 0.53
scoped_resource 3.7 6.9 0.53
cgi 3.8 7.1 0.54
loops 3.9 7.2 0.55
cartesian 3.8 6.9 0.55
control_flow 3.8 6.9 0.55
files 3.8 6.9 0.55
length 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
containers 28.5 47.8 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cartesian 0 8 0.000
classes 0 18 0.000
fib_iter 0 8 0.000
files 0 12 0.000
modules 0 4 0.000
scoped_resource 0 12 0.000
tuple_return_value 0 4 0.000
containers 5 24 0.215
parse 4 12 0.308
control_flow 4 8 0.497
cgi 4 8 0.505
asdl_generated 5 8 0.688
fib_recursive 4 4 0.897
varargs 47 48 0.974
length 11 4 2.784
escape 8 0 inf
loops 0 0 NA

raw benchmark files