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
loops 0 199 0.000
scoped_resource 3 529 0.006
modules 1 127 0.007
fib_iter 5 606 0.008
fib_recursive 7 610 0.012
asdl_generated 7 264 0.026
parse 16 552 0.029
files 5 51 0.089
tuple_return_value 13 131 0.100
classes 2 18 0.106
containers 10 86 0.115
length 29 142 0.204
cartesian 56 238 0.236
escape 73 241 0.301
cgi 179 357 0.502
control_flow 148 80 1.855
varargs 20 9 2.310

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 11.0 0.42
cgi 3.7 7.2 0.51
asdl_generated 3.7 7.1 0.52
parse 3.9 7.6 0.52
cartesian 3.7 7.0 0.52
modules 3.8 7.1 0.53
escape 3.7 7.1 0.53
loops 3.9 7.3 0.53
fib_iter 3.8 7.1 0.53
scoped_resource 3.8 7.0 0.54
length 3.8 7.1 0.54
files 3.8 7.0 0.54
control_flow 3.9 7.1 0.56
tuple_return_value 4.0 7.1 0.56
fib_recursive 3.9 7.0 0.56
containers 28.5 47.8 0.60
varargs 5.6 7.2 0.78

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
containers 0 4 0.000
escape 0 8 0.000
fib_iter 0 8 0.000
length 0 4 0.000
loops 2 8 0.296
varargs 8 21 0.370
scoped_resource 3 4 0.833
parse 4 4 0.998
cartesian 4 0 inf
cgi 4 0 inf
asdl_generated 0 0 NA
classes 0 0 NA
control_flow 0 0 NA
fib_recursive 0 0 NA
files 0 0 NA
modules 0 0 NA
tuple_return_value 0 0 NA

raw benchmark files