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 897 0.009
modules 2 179 0.010
fib_recursive 11 878 0.012
loops 4 292 0.013
asdl_generated 7 364 0.020
parse 27 760 0.035
scoped_resource 44 1,024 0.043
containers 8 120 0.066
files 8 69 0.117
tuple_return_value 23 190 0.119
classes 3 20 0.178
length 40 207 0.193
escape 78 343 0.228
cartesian 83 334 0.247
cgi 269 505 0.534
varargs 27 20 1.347
control_flow 211 115 1.840

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
loops 3.5 7.1 0.50
parse 3.8 7.5 0.51
asdl_generated 3.5 6.9 0.51
cartesian 3.5 6.9 0.51
cgi 3.5 6.9 0.51
escape 3.7 7.1 0.52
files 3.8 7.1 0.54
tuple_return_value 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
scoped_resource 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
fib_recursive 3.9 6.9 0.57
containers 28.5 47.7 0.60
varargs 5.6 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 16 0.000
classes 0 12 0.000
fib_iter 0 4 0.000
fib_recursive 0 8 0.000
files 0 8 0.000
loops 0 8 0.000
modules 0 8 0.000
asdl_generated 4 16 0.229
scoped_resource 4 16 0.250
parse 4 12 0.316
containers 8 20 0.395
length 4 8 0.502
varargs 39 53 0.740
tuple_return_value 4 4 0.950
cartesian 8 4 1.975
escape 29 12 2.406
control_flow 0 0 NA

raw benchmark files