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 19 0.000
fib_iter 8 884 0.009
modules 2 186 0.010
loops 4 296 0.012
fib_recursive 11 891 0.012
asdl_generated 7 388 0.019
parse 29 753 0.039
containers 5 121 0.043
scoped_resource 47 1,043 0.045
tuple_return_value 20 196 0.103
files 7 72 0.104
length 40 202 0.200
cartesian 82 328 0.251
escape 101 351 0.287
cgi 265 508 0.521
varargs 12 16 0.733
control_flow 205 111 1.853

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.6 0.42
cgi 3.5 7.1 0.50
parse 3.8 7.6 0.50
fib_recursive 3.5 6.9 0.51
escape 3.7 7.1 0.52
loops 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
files 3.8 7.1 0.54
fib_iter 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
containers 28.8 47.8 0.60
varargs 5.5 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
fib_iter 0 8 0.000
fib_recursive 0 4 0.000
files 0 4 0.000
loops 0 8 0.000
modules 0 4 0.000
parse 0 12 0.000
scoped_resource 0 8 0.000
classes 3 11 0.283
asdl_generated 4 12 0.300
cgi 4 8 0.494
length 4 8 0.510
containers 10 16 0.640
varargs 55 56 0.977
cartesian 8 8 0.992
escape 4 4 0.999
control_flow 4 4 1.017
tuple_return_value 0 0 NA

raw benchmark files