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 15 0.000
fib_iter 4 892 0.004
modules 2 174 0.010
loops 4 297 0.012
fib_recursive 11 870 0.012
asdl_generated 11 385 0.028
parse 30 767 0.039
scoped_resource 44 1,008 0.043
tuple_return_value 10 190 0.053
files 4 68 0.054
containers 12 123 0.096
length 38 199 0.189
escape 90 344 0.262
cartesian 86 323 0.266
varargs 12 28 0.446
cgi 268 509 0.526
control_flow 208 110 1.888

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.7 7.6 0.48
modules 3.5 7.1 0.50
cgi 3.7 7.1 0.52
loops 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
escape 3.7 6.9 0.53
files 3.7 6.9 0.53
scoped_resource 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
cartesian 3.8 6.9 0.55
fib_iter 3.8 6.9 0.55
length 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
fib_recursive 3.9 6.9 0.57
containers 28.6 47.8 0.60
varargs 5.4 6.9 0.77

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 12 0.000
control_flow 0 4 0.000
fib_recursive 0 12 0.000
modules 0 8 0.000
parse 0 4 0.000
classes 3 15 0.210
containers 4 12 0.319
files 4 8 0.462
scoped_resource 4 8 0.495
length 8 8 0.927
fib_iter 4 4 0.943
varargs 54 44 1.229
escape 16 12 1.365
cartesian 8 4 1.958
tuple_return_value 10 4 2.488
asdl_generated 0 0 NA
loops 0 0 NA

raw benchmark files