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 4 887 0.004
modules 2 179 0.010
fib_recursive 11 899 0.012
loops 4 302 0.012
asdl_generated 11 388 0.028
containers 4 109 0.037
parse 30 753 0.039
scoped_resource 43 1,019 0.043
files 4 64 0.058
tuple_return_value 20 189 0.106
classes 3 24 0.137
length 44 244 0.182
cartesian 83 333 0.250
escape 100 346 0.288
cgi 254 521 0.488
control_flow 209 108 1.944
varargs 25 11 2.190

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

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 8 0.000
classes 0 8 0.000
control_flow 0 8 0.000
fib_recursive 0 12 0.000
length 0 8 0.000
loops 0 4 0.000
modules 0 4 0.000
parse 0 8 0.000
tuple_return_value 0 4 0.000
files 4 12 0.308
scoped_resource 4 12 0.328
containers 12 28 0.427
escape 4 8 0.496
varargs 42 61 0.684
fib_iter 4 4 0.956
cartesian 8 4 2.000
asdl_generated 0 0 NA

raw benchmark files