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 30 0.000
modules 0 170 0.000
fib_iter 8 887 0.008
fib_recursive 11 889 0.013
loops 4 292 0.013
asdl_generated 11 373 0.029
parse 30 760 0.039
scoped_resource 44 1,036 0.043
containers 12 110 0.107
tuple_return_value 20 181 0.110
files 8 65 0.117
length 40 203 0.198
cartesian 86 334 0.259
escape 98 348 0.282
varargs 12 28 0.414
cgi 254 517 0.491
control_flow 209 107 1.961

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.7 0.40
asdl_generated 3.4 6.9 0.49
parse 3.8 7.5 0.51
cgi 3.7 7.1 0.52
cartesian 3.7 6.9 0.53
escape 3.7 6.9 0.53
modules 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
fib_iter 3.8 7.1 0.54
files 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
control_flow 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
length 3.8 6.9 0.55
loops 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
asdl_generated 0 4 0.000
cgi 0 4 0.000
control_flow 0 8 0.000
fib_iter 0 8 0.000
fib_recursive 0 4 0.000
files 0 11 0.000
loops 0 4 0.000
parse 0 4 0.000
tuple_return_value 0 12 0.000
containers 4 27 0.143
modules 2 12 0.155
cartesian 4 12 0.330
scoped_resource 4 4 1.006
length 4 4 1.009
escape 8 8 1.021
varargs 55 44 1.230
classes 3 0 inf

raw benchmark files