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
loops gen 0 3 320 0.000
fib_iter gen 8 4 891 0.009
modules gen 2 2 179 0.010
fib_recursive gen 11 11 882 0.013
asdl_generated gen 5 11 395 0.014
parse gen 25 19 780 0.032
scoped_resource gen 41 46 1,044 0.039
containers gen 12 11 131 0.091
files gen 8 8 81 0.099
tuple_return_value gen 20 15 190 0.108
classes gen 3 3 23 0.137
length gen 45 36 213 0.212
cartesian gen 84 86 327 0.256
escape gen 97 104 359 0.270
gc_stack_roots gen 2 2 4 0.454
cgi gen 265 260 513 0.517
varargs gen 12 8 20 0.625
control_flow gen 211 161 114 1.851

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
cartesian gen 3.5 3.5 8.4 0.42
escape gen 3.7 3.7 8.5 0.43
tuple_return_value gen 3.7 3.8 8.5 0.43
parse gen 3.9 3.7 9.0 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
cgi gen 3.7 3.5 8.4 0.44
control_flow gen 3.7 3.9 8.4 0.44
gc_stack_roots gen 3.7 3.4 8.4 0.44
length gen 3.7 3.9 8.4 0.44
loops gen 3.7 3.8 8.4 0.44
scoped_resource gen 3.7 3.5 8.4 0.44
fib_recursive gen 3.8 3.8 8.5 0.45
modules gen 3.8 3.7 8.5 0.45
fib_iter gen 3.8 3.8 8.4 0.45
files gen 3.9 3.8 8.5 0.46
containers gen 28.7 28.6 49.1 0.58
varargs gen 5.6 5.5 8.5 0.66

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 0 16 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 4 4 0.000
fib_recursive gen 0 0 12 0.000
files gen 0 0 4 0.000
gc_stack_roots gen 0 0 16 0.000
length gen 0 8 4 0.000
modules gen 0 0 12 0.000
tuple_return_value gen 0 4 12 0.000
containers gen 4 4 16 0.243
cgi gen 4 8 12 0.337
parse gen 4 8 8 0.528
cartesian gen 8 8 12 0.667
scoped_resource gen 8 0 12 0.677
asdl_generated gen 5 0 8 0.686
varargs gen 54 58 60 0.903
loops gen 4 0 4 0.916
escape gen 8 4 4 2.023

raw benchmark files