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_recursive 30.8 989.1 0.03
modules 8.5 221.6 0.04
fib_iter 53.2 795.7 0.07
tuple_return_value 15.6 148.7 0.11
scoped_resource 103.0 957.4 0.11
loops 43.1 350.1 0.12
containers 50.9 174.2 0.29
asdl_generated 77.9 254.1 0.31
parse 690.3 1,773.1 0.39
cgi 629.4 569.0 1.11
files 125.2 93.2 1.34
control_flow 359.4 131.8 2.73
escape 1,490.6 407.1 3.66
cartesian 3,528.5 898.5 3.93
length 1,409.0 238.3 5.91
classes 676.1 32.5 20.83

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
containers 33.2 47.6 0.7
scoped_resource 6.3 7.1 0.9
tuple_return_value 6.3 7.0 0.9
fib_iter 6.5 6.9 0.9
loops 6.9 7.2 0.9
modules 6.6 6.9 1.0
fib_recursive 6.6 6.9 1.0
asdl_generated 42.1 6.9 6.1
files 45.2 7.1 6.4
control_flow 63.4 6.9 9.2
cgi 150.3 6.9 21.6
parse 187.0 7.6 24.5
length 276.7 6.9 40.3
escape 422.1 7.0 60.5
cartesian 924.7 6.9 133.6
classes 2,263.0 7.2 313.4