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 gen C++ C++-Souffle Python C++ : Python
classes gen 0 3 25 0.000
modules gen 0 2 210 0.000
fib_iter gen 8 8 937 0.008
fib_recursive gen 11 11 892 0.012
loops gen 4 3 297 0.012
asdl_generated gen 11 11 381 0.028
parse gen 23 27 761 0.030
scoped_resource gen 43 46 1,046 0.041
containers gen 8 7 115 0.068
files gen 7 4 82 0.089
tuple_return_value gen 19 15 200 0.096
length gen 40 41 219 0.183
cartesian gen 79 78 335 0.235
escape gen 94 92 365 0.257
gc_stack_roots gen 2 0 4 0.443
cgi gen 270 263 552 0.488
varargs gen 17 23 16 1.033
control_flow gen 208 160 110 1.898
pea_hello gen NA NA 7 NA

Max Resident Set Size (MB)

Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).

example name gen C++ C++-Souffle Python C++ : Python
classes gen 4.5 4.5 12.3 0.36
gc_stack_roots gen 3.5 3.5 8.5 0.42
cgi gen 3.5 3.5 8.4 0.42
parse gen 3.8 3.8 9.0 0.42
cartesian gen 3.7 3.5 8.5 0.43
modules gen 3.7 3.9 8.5 0.43
scoped_resource gen 3.7 3.7 8.5 0.43
asdl_generated gen 3.7 3.5 8.4 0.44
escape gen 3.7 3.5 8.4 0.44
fib_recursive gen 3.8 3.8 8.5 0.45
files gen 3.8 3.8 8.5 0.45
fib_iter gen 3.8 3.5 8.4 0.45
loops gen 3.8 3.8 8.4 0.45
tuple_return_value gen 3.8 3.8 8.4 0.45
control_flow gen 3.9 3.8 8.7 0.45
length gen 3.9 3.7 8.4 0.47
containers gen 28.6 28.5 49.1 0.58
varargs gen 5.5 5.5 8.4 0.66
pea_hello gen NA NA 8.0 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 16 0.000
cgi gen 0 4 4 0.000
control_flow gen 0 0 12 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 4 4 0.000
gc_stack_roots gen 0 2 16 0.000
loops gen 0 0 8 0.000
tuple_return_value gen 0 4 4 0.000
modules gen 2 0 8 0.229
classes gen 3 0 13 0.259
containers gen 8 7 28 0.283
parse gen 8 0 20 0.379
scoped_resource gen 4 0 8 0.535
varargs gen 50 42 64 0.775
cartesian gen 12 8 12 0.987
escape gen 12 12 4 3.054
length gen 4 4 0 inf
pea_hello gen NA NA 11 NA

raw benchmark files