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_iter 8 891 0.009
modules 2 174 0.010
loops 4 335 0.011
fib_recursive 11 875 0.012
asdl_generated 11 377 0.029
parse 26 771 0.034
scoped_resource 39 1,043 0.038
containers 4 99 0.044
files 4 76 0.050
tuple_return_value 14 194 0.071
classes 3 32 0.103
length 41 201 0.203
cartesian 83 329 0.253
escape 108 355 0.303
varargs 12 31 0.383
cgi 262 507 0.516
control_flow 203 113 1.793

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
parse 3.8 7.5 0.51
fib_iter 3.5 6.9 0.51
cgi 3.7 7.1 0.52
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
fib_recursive 3.7 6.9 0.53
files 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
length 3.8 7.1 0.54
loops 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
control_flow 3.9 6.8 0.58
containers 28.7 47.8 0.60
varargs 5.4 6.9 0.77

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 8 0.000
escape 0 4 0.000
fib_iter 0 12 0.000
fib_recursive 0 12 0.000
loops 0 4 0.000
modules 0 8 0.000
containers 13 40 0.328
length 4 12 0.344
parse 4 8 0.465
cartesian 8 12 0.657
control_flow 4 4 0.984
scoped_resource 8 8 0.987
cgi 8 8 1.009
varargs 55 42 1.301
files 4 0 inf
tuple_return_value 7 0 inf
classes 0 0 NA

raw benchmark files