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 2.1 342.7 0.006
asdl_generated 6.0 573.0 0.011
fib_iter 15.2 1,387.1 0.011
loops 7.1 524.1 0.014
scoped_resource 19.9 1,271.2 0.016
fib_recursive 27.1 1,419.5 0.019
tuple_return_value 5.8 212.1 0.027
classes 5.3 42.7 0.124
strings 2.2 16.4 0.136
cgi 114.8 785.3 0.146
varargs 3.5 18.8 0.188
escape 115.3 565.5 0.204
length 65.1 281.7 0.231
containers 62.3 180.0 0.346

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
loops 2.9 7.8 0.37
strings 2.9 7.7 0.38
fib_iter 3.0 7.5 0.40
varargs 3.0 7.4 0.41
modules 3.1 7.5 0.41
scoped_resource 3.1 7.5 0.41
tuple_return_value 3.1 7.4 0.41
fib_recursive 3.1 7.4 0.42
asdl_generated 3.2 7.5 0.43
escape 3.2 7.4 0.43
cgi 3.3 7.6 0.43
classes 3.4 7.8 0.44
length 3.4 7.6 0.44
containers 36.1 48.0 0.75

TODO