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 4 8 939 0.004
modules gen 2 0 192 0.009
fib_recursive gen 11 11 876 0.012
loops gen 4 0 297 0.013
asdl_generated gen 7 11 387 0.018
containers gen 4 7 134 0.029
parse gen 23 23 784 0.029
scoped_resource gen 44 41 1,044 0.042
tuple_return_value gen 19 18 212 0.091
classes gen 3 3 34 0.094
files gen 7 7 72 0.101
gc_stack_roots gen 2 2 16 0.109
length gen 30 47 213 0.141
cartesian gen 90 82 338 0.266
escape gen 106 90 352 0.303
varargs gen 8 23 23 0.357
cgi gen 269 268 522 0.515
control_flow gen 212 159 112 1.886
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.4 0.36
fib_iter gen 3.5 3.7 8.4 0.42
gc_stack_roots gen 3.5 3.5 8.4 0.42
scoped_resource gen 3.7 3.5 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
cartesian gen 3.7 3.5 8.4 0.44
cgi gen 3.7 3.8 8.4 0.44
escape gen 3.7 3.7 8.4 0.44
files gen 3.7 3.8 8.4 0.44
length gen 3.7 3.8 8.4 0.44
parse gen 3.9 3.8 9.0 0.44
fib_recursive gen 3.8 3.9 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
modules gen 3.8 3.8 8.5 0.45
tuple_return_value gen 3.8 3.7 8.5 0.45
control_flow gen 3.9 3.9 8.5 0.46
containers gen 28.4 28.7 49.1 0.58
varargs gen 5.4 5.5 8.5 0.63
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cartesian gen 0 4 8 0.000
cgi gen 0 0 8 0.000
classes gen 0 0 4 0.000
control_flow gen 0 4 8 0.000
escape gen 0 12 8 0.000
fib_recursive gen 0 0 16 0.000
files gen 0 0 12 0.000
gc_stack_roots gen 0 0 4 0.000
loops gen 0 3 12 0.000
modules gen 0 2 4 0.000
tuple_return_value gen 0 0 8 0.000
fib_iter gen 4 0 8 0.473
scoped_resource gen 4 4 8 0.500
asdl_generated gen 4 0 4 0.896
varargs gen 57 42 57 1.001
containers gen 12 7 8 1.425
parse gen 8 4 4 1.890
length gen 15 0 4 3.728
pea_hello gen NA NA 5 NA

raw benchmark files