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
loops 0 298 0.000
fib_recursive 7 883 0.008
fib_iter 8 894 0.008
asdl_generated 4 373 0.010
modules 2 178 0.011
parse 23 763 0.030
containers 4 105 0.039
scoped_resource 44 1,032 0.042
files 4 76 0.050
tuple_return_value 14 188 0.072
classes 4 23 0.158
length 40 199 0.201
cartesian 86 334 0.259
escape 95 345 0.275
cgi 261 505 0.516
varargs 24 28 0.839
control_flow 209 108 1.930

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.8 7.7 0.49
modules 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
escape 3.7 6.9 0.53
loops 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
cgi 3.8 6.9 0.55
fib_iter 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
files 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
length 3.9 6.9 0.57
containers 28.7 47.8 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
classes 0 8 0.000
control_flow 0 8 0.000
fib_iter 0 4 0.000
modules 0 4 0.000
scoped_resource 4 12 0.331
containers 12 32 0.379
length 4 8 0.503
tuple_return_value 7 12 0.564
asdl_generated 7 12 0.611
cgi 8 12 0.663
fib_recursive 4 4 0.907
varargs 43 44 0.979
escape 12 12 0.996
cartesian 4 4 1.034
parse 8 4 1.881
files 4 0 inf
loops 4 0 inf

raw benchmark files