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 27 0.000
fib_recursive 7 929 0.008
fib_iter 8 886 0.009
modules 2 169 0.011
loops 4 297 0.013
asdl_generated 11 375 0.029
parse 26 778 0.033
scoped_resource 43 1,040 0.042
files 4 72 0.051
tuple_return_value 16 185 0.087
containers 15 109 0.141
length 41 204 0.198
cartesian 86 338 0.254
escape 101 339 0.299
cgi 269 497 0.541
varargs 25 16 1.609
control_flow 207 106 1.947

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.3 10.9 0.40
parse 3.7 7.5 0.49
scoped_resource 3.7 7.2 0.51
asdl_generated 3.5 6.9 0.51
escape 3.5 6.9 0.51
cartesian 3.7 7.1 0.52
files 3.7 7.1 0.52
length 3.7 6.9 0.53
fib_recursive 3.8 7.1 0.54
loops 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
cgi 3.8 6.9 0.55
fib_iter 3.8 6.9 0.55
modules 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
containers 28.4 47.8 0.59
varargs 5.6 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 8 0.000
cgi 0 12 0.000
containers 0 28 0.000
control_flow 0 8 0.000
fib_iter 0 8 0.000
loops 0 4 0.000
modules 0 12 0.000
escape 4 12 0.339
tuple_return_value 4 8 0.499
varargs 42 54 0.766
classes 3 4 0.829
files 4 4 0.918
parse 4 4 0.924
cartesian 4 4 0.982
length 4 4 1.012
fib_recursive 4 0 inf
scoped_resource 4 0 inf

raw benchmark files