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 174 0.000
fib_iter 8 876 0.009
fib_recursive 11 881 0.012
loops 4 295 0.012
asdl_generated 11 371 0.029
parse 26 773 0.034
scoped_resource 43 1,032 0.041
files 4 72 0.051
containers 8 111 0.070
tuple_return_value 13 190 0.071
classes 3 27 0.118
length 32 214 0.150
cartesian 81 345 0.236
escape 102 339 0.302
varargs 17 36 0.457
cgi 261 509 0.513
control_flow 210 112 1.866

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.7 0.49
fib_iter 3.5 6.9 0.51
cartesian 3.7 6.9 0.53
cgi 3.7 6.9 0.53
control_flow 3.7 6.9 0.53
escape 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
fib_recursive 3.8 6.9 0.55
files 3.8 6.9 0.55
scoped_resource 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
asdl_generated 3.8 6.8 0.56
containers 28.4 47.7 0.60
varargs 5.4 6.9 0.77

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 12 0.000
classes 0 4 0.000
control_flow 0 4 0.000
fib_iter 0 16 0.000
fib_recursive 0 4 0.000
modules 2 8 0.233
containers 8 28 0.279
scoped_resource 4 12 0.325
escape 4 8 0.507
tuple_return_value 7 12 0.565
cartesian 8 12 0.651
files 4 4 0.921
parse 4 4 0.927
cgi 8 8 0.986
varargs 50 36 1.371
length 12 0 inf
loops 0 0 NA

raw benchmark files