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
fib_iter gen 8 8 894 0.008
modules gen 2 0 186 0.009
fib_recursive gen 11 11 904 0.012
loops gen 4 0 298 0.013
asdl_generated gen 5 11 372 0.014
containers gen 4 5 113 0.034
parse gen 27 19 772 0.034
scoped_resource gen 40 42 1,044 0.038
tuple_return_value gen 15 15 195 0.079
gc_stack_roots gen 2 2 17 0.102
files gen 7 7 71 0.103
classes gen 3 0 23 0.139
length gen 41 41 216 0.191
cartesian gen 87 74 326 0.268
escape gen 102 94 351 0.291
cgi gen 270 267 524 0.515
varargs gen 16 19 20 0.778
control_flow gen 206 157 118 1.743
pea_hello gen NA NA 14 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
parse gen 3.7 3.9 9.0 0.41
cartesian gen 3.5 3.7 8.4 0.42
gc_stack_roots gen 3.5 3.5 8.4 0.42
asdl_generated gen 3.7 3.5 8.5 0.43
cgi gen 3.7 3.7 8.4 0.44
escape gen 3.7 3.5 8.4 0.44
modules gen 3.8 3.8 8.7 0.44
fib_recursive gen 3.8 3.8 8.5 0.45
length gen 3.8 3.8 8.5 0.45
scoped_resource gen 3.8 3.5 8.5 0.45
control_flow gen 3.8 3.9 8.4 0.45
fib_iter gen 3.8 3.7 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
files gen 3.9 3.8 8.5 0.46
containers gen 28.7 28.5 48.9 0.59
varargs gen 5.5 5.6 8.1 0.68
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 0 8 0.000
classes gen 0 3 15 0.000
control_flow gen 0 4 4 0.000
fib_iter gen 0 0 12 0.000
files gen 0 0 12 0.000
gc_stack_roots gen 0 0 8 0.000
loops gen 0 3 8 0.000
modules gen 0 2 8 0.000
length gen 4 4 12 0.312
asdl_generated gen 5 0 16 0.337
escape gen 4 8 12 0.342
containers gen 12 9 28 0.413
parse gen 4 8 8 0.475
cartesian gen 4 12 8 0.500
scoped_resource gen 8 4 12 0.666
varargs gen 51 46 60 0.843
tuple_return_value gen 4 4 4 0.964
fib_recursive gen 0 0 0 NA
pea_hello gen NA NA 5 NA

raw benchmark files