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
fib_iter 8 884 0.009
modules 2 182 0.010
fib_recursive 11 885 0.012
loops 4 289 0.013
asdl_generated 11 381 0.028
containers 4 104 0.037
parse 30 765 0.039
scoped_resource 44 1,046 0.042
files 7 72 0.101
tuple_return_value 20 190 0.106
length 40 208 0.193
classes 3 15 0.206
cartesian 82 329 0.250
escape 99 351 0.282
cgi 265 499 0.531
varargs 23 20 1.168
control_flow 208 118 1.768

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.6 0.41
cartesian 3.5 6.9 0.51
escape 3.7 7.1 0.52
loops 3.7 7.1 0.52
modules 3.7 7.1 0.52
parse 3.9 7.5 0.53
cgi 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
length 3.7 6.9 0.53
scoped_resource 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
control_flow 3.8 7.1 0.54
files 3.8 7.1 0.54
asdl_generated 3.7 6.8 0.54
fib_iter 3.8 6.9 0.55
containers 28.5 47.8 0.59
varargs 5.4 6.8 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 4 0.000
classes 0 15 0.000
fib_recursive 0 4 0.000
files 0 4 0.000
loops 0 12 0.000
parse 0 4 0.000
tuple_return_value 0 8 0.000
containers 11 32 0.357
scoped_resource 4 8 0.495
cgi 4 8 0.496
varargs 43 52 0.824
length 4 4 1.005
cartesian 8 8 1.023
escape 8 0 inf
control_flow 0 0 NA
fib_iter 0 0 NA
modules 0 0 NA

raw benchmark files