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 4 885 0.004
modules 2 178 0.010
fib_recursive 11 882 0.012
loops 4 286 0.014
asdl_generated 11 375 0.029
parse 29 769 0.038
containers 4 93 0.041
scoped_resource 48 1,026 0.047
tuple_return_value 20 185 0.108
files 7 65 0.114
classes 3 23 0.141
length 45 202 0.226
cartesian 80 327 0.244
escape 100 345 0.291
varargs 8 24 0.331
cgi 255 513 0.497
control_flow 208 105 1.986

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.6 10.8 0.43
parse 3.7 7.6 0.48
cartesian 3.5 6.9 0.51
cgi 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
files 3.8 7.1 0.54
loops 3.8 7.1 0.54
scoped_resource 3.8 7.1 0.54
escape 3.7 6.8 0.54
control_flow 3.8 6.9 0.55
fib_iter 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
length 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
modules 3.9 6.9 0.57
containers 28.7 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
cgi 0 4 0.000
classes 0 8 0.000
control_flow 0 12 0.000
fib_recursive 0 8 0.000
files 0 11 0.000
length 0 8 0.000
loops 0 12 0.000
modules 0 8 0.000
parse 0 4 0.000
tuple_return_value 0 8 0.000
containers 12 43 0.271
fib_iter 4 8 0.474
escape 4 8 0.501
varargs 59 48 1.242
cartesian 12 4 3.000
scoped_resource 0 0 NA

raw benchmark files