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 7 896 0.008
modules 2 173 0.010
fib_recursive 11 930 0.012
loops 4 290 0.012
asdl_generated 11 371 0.029
parse 25 768 0.033
scoped_resource 47 1,027 0.046
containers 5 105 0.048
tuple_return_value 16 203 0.079
files 8 69 0.110
length 40 208 0.194
cartesian 91 339 0.268
escape 95 347 0.274
cgi 261 509 0.513
varargs 12 16 0.730
control_flow 208 106 1.958

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.8 0.41
parse 3.8 7.5 0.51
escape 3.5 6.9 0.51
fib_iter 3.7 7.1 0.52
loops 3.8 7.2 0.53
cartesian 3.7 6.9 0.53
cgi 3.7 6.9 0.53
scoped_resource 3.7 6.9 0.53
tuple_return_value 3.8 7.1 0.54
control_flow 3.7 6.8 0.54
asdl_generated 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
files 3.8 6.8 0.56
containers 28.9 47.8 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 8 0.000
cartesian 0 4 0.000
control_flow 0 12 0.000
fib_recursive 0 12 0.000
files 0 8 0.000
loops 0 8 0.000
modules 0 8 0.000
scoped_resource 0 4 0.000
containers 10 28 0.356
classes 3 8 0.421
cgi 4 8 0.498
varargs 54 56 0.974
tuple_return_value 4 4 1.006
parse 4 4 1.041
escape 12 8 1.474
length 4 0 inf
fib_iter 0 0 NA

raw benchmark files