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 18 0.000
modules 0 180 0.000
fib_iter 7 912 0.008
asdl_generated 4 375 0.010
fib_recursive 11 903 0.012
loops 4 299 0.012
parse 26 774 0.034
containers 4 108 0.036
scoped_resource 43 1,032 0.042
tuple_return_value 20 194 0.103
files 7 68 0.109
cartesian 70 335 0.209
length 45 207 0.216
escape 102 344 0.297
varargs 12 25 0.476
cgi 265 510 0.520
control_flow 209 110 1.897

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.3 10.6 0.41
fib_recursive 3.4 6.9 0.49
cartesian 3.5 6.9 0.51
cgi 3.5 6.9 0.51
parse 3.9 7.6 0.52
asdl_generated 3.7 6.9 0.53
escape 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
files 3.8 7.1 0.54
loops 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
containers 28.6 47.8 0.60
varargs 5.5 6.7 0.82

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 8 0.000
control_flow 0 4 0.000
fib_iter 0 8 0.000
fib_recursive 0 4 0.000
files 0 8 0.000
length 0 4 0.000
loops 0 4 0.000
tuple_return_value 0 8 0.000
classes 3 14 0.227
parse 4 12 0.308
containers 12 32 0.362
modules 2 4 0.458
escape 4 8 0.497
asdl_generated 7 8 0.901
scoped_resource 4 4 0.975
varargs 55 49 1.111
cartesian 19 4 4.867

raw benchmark files