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_iter 8 894 0.008
modules 2 179 0.010
fib_recursive 11 885 0.012
loops 4 293 0.012
asdl_generated 11 381 0.029
parse 25 754 0.034
scoped_resource 43 1,034 0.042
containers 12 129 0.090
tuple_return_value 20 189 0.106
files 7 69 0.108
length 41 202 0.201
cartesian 91 339 0.268
escape 94 347 0.272
cgi 269 515 0.521
varargs 23 16 1.443
control_flow 206 109 1.899

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.8 7.6 0.50
cartesian 3.7 7.1 0.52
cgi 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
escape 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
loops 3.8 7.1 0.54
asdl_generated 3.8 6.9 0.55
files 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
containers 28.5 47.8 0.59
varargs 5.4 6.9 0.77

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 4 0.000
cartesian 0 8 0.000
cgi 0 8 0.000
fib_iter 0 4 0.000
fib_recursive 0 4 0.000
files 0 8 0.000
loops 0 4 0.000
modules 0 4 0.000
tuple_return_value 0 4 0.000
parse 4 12 0.355
classes 3 8 0.414
containers 4 8 0.480
length 4 8 0.502
control_flow 4 8 0.503
varargs 43 57 0.756
scoped_resource 4 4 0.986
escape 12 8 1.481

raw benchmark files