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 179 0.000
fib_iter 8 894 0.008
fib_recursive 11 870 0.012
loops 4 298 0.013
asdl_generated 7 392 0.019
parse 33 749 0.044
scoped_resource 47 1,023 0.046
files 4 65 0.059
tuple_return_value 12 188 0.065
containers 11 124 0.086
classes 3 29 0.111
length 45 201 0.224
cartesian 91 327 0.279
escape 98 345 0.285
cgi 251 500 0.502
varargs 16 23 0.682
control_flow 206 108 1.904

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.3 10.8 0.40
parse 3.8 7.7 0.49
cartesian 3.5 7.1 0.50
escape 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
fib_iter 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
length 3.8 7.1 0.54
loops 3.8 7.1 0.54
modules 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
cgi 3.7 6.8 0.54
asdl_generated 3.8 6.9 0.55
control_flow 3.8 6.9 0.55
files 3.9 6.9 0.57
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
cartesian 0 8 0.000
classes 0 4 0.000
control_flow 0 8 0.000
fib_iter 0 4 0.000
fib_recursive 0 16 0.000
length 0 8 0.000
scoped_resource 0 8 0.000
containers 5 16 0.332
files 4 12 0.332
cgi 4 12 0.332
parse 4 12 0.341
modules 2 4 0.481
asdl_generated 4 4 0.917
escape 8 8 0.979
tuple_return_value 8 8 1.019
varargs 51 50 1.023
loops 0 0 NA

raw benchmark files