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 23 0.000
fib_recursive 7 887 0.008
fib_iter 8 890 0.009
modules 2 174 0.010
loops 4 310 0.012
asdl_generated 11 382 0.028
parse 30 751 0.039
scoped_resource 43 1,011 0.043
tuple_return_value 16 194 0.083
files 7 72 0.101
containers 11 98 0.116
length 44 205 0.217
cartesian 88 344 0.256
escape 95 341 0.279
cgi 267 506 0.528
varargs 12 16 0.734
control_flow 204 106 1.937

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.6 0.50
cgi 3.5 6.9 0.51
fib_recursive 3.5 6.9 0.51
control_flow 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
files 3.7 6.9 0.53
loops 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
cartesian 3.7 6.8 0.54
escape 3.7 6.8 0.54
asdl_generated 3.8 6.9 0.55
fib_iter 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
containers 28.5 47.8 0.60
varargs 5.4 6.9 0.77

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
fib_iter 0 8 0.000
files 0 4 0.000
length 0 4 0.000
loops 0 4 0.000
modules 0 8 0.000
parse 0 12 0.000
containers 4 35 0.107
cartesian 4 12 0.333
classes 3 8 0.422
cgi 4 8 0.500
scoped_resource 4 8 0.539
varargs 54 56 0.978
control_flow 8 8 1.006
escape 12 8 1.480
fib_recursive 4 0 inf
tuple_return_value 4 0 inf
asdl_generated 0 0 NA

raw benchmark files