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
modules 0.8 185.2 0.004
fib_iter 3.3 718.3 0.005
loops 3.4 340.9 0.010
fib_recursive 10.4 881.6 0.012
scoped_resource 15.8 814.8 0.019
tuple_return_value 3.4 116.0 0.029
classes 1.8 22.2 0.082
strings 0.8 7.7 0.105
containers 50.7 95.3 0.532
asdl_generated 198.1 364.7 0.543
varargs 2.8 3.3 0.864
cgi 898.0 490.1 1.832
escape 2,600.6 328.2 7.925
length 1,539.3 158.2 9.729

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
strings 3.0 7.5 0.40
containers 19.1 48.1 0.40
modules 3.0 7.5 0.40
fib_iter 3.0 7.5 0.40
varargs 3.0 7.5 0.40
loops 3.2 7.8 0.41
classes 3.3 7.8 0.42
tuple_return_value 3.1 7.3 0.42
scoped_resource 3.2 7.5 0.42
fib_recursive 3.2 7.5 0.43
asdl_generated 26.2 7.6 3.46
cgi 49.1 7.5 6.54
length 76.1 7.5 10.13
escape 119.7 7.4 16.17

TODO