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 291 0.000
modules gen 0 0 180 0.000
fib_iter gen 8 8 897 0.009
fib_recursive gen 11 11 884 0.012
asdl_generated gen 11 11 381 0.028
parse gen 26 23 769 0.033
scoped_resource gen 48 38 1,032 0.046
containers gen 8 4 121 0.063
tuple_return_value gen 16 18 196 0.083
classes gen 3 0 35 0.093
files gen 7 0 72 0.103
length gen 45 34 206 0.219
gc_stack_roots gen 2 2 8 0.219
cartesian gen 89 75 337 0.264
escape gen 97 99 360 0.268
cgi gen 245 260 531 0.462
varargs gen 17 8 12 1.386
control_flow gen 210 157 110 1.917

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.6 12.4 0.36
gc_stack_roots gen 3.5 3.4 8.5 0.42
cgi gen 3.5 3.7 8.4 0.42
fib_iter gen 3.5 3.7 8.4 0.42
parse gen 3.8 3.9 8.9 0.43
escape gen 3.7 3.5 8.5 0.43
modules gen 3.7 3.8 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
cartesian gen 3.7 3.7 8.4 0.44
control_flow gen 3.8 3.8 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
scoped_resource gen 3.8 3.8 8.5 0.45
fib_recursive gen 3.8 3.7 8.4 0.45
files gen 3.9 3.8 8.5 0.46
length gen 3.9 3.8 8.4 0.47
tuple_return_value gen 3.9 3.7 8.4 0.47
containers gen 28.5 28.6 48.9 0.58
varargs gen 5.5 5.6 8.5 0.65

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 8 0.000
classes gen 0 3 4 0.000
control_flow gen 0 4 12 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 7 12 0.000
gc_stack_roots gen 0 0 12 0.000
length gen 0 11 8 0.000
scoped_resource gen 0 8 12 0.000
modules gen 2 2 12 0.149
loops gen 4 0 16 0.228
parse gen 4 4 12 0.307
containers gen 8 11 24 0.315
varargs gen 50 58 68 0.734
escape gen 8 4 8 1.005
cartesian gen 4 12 4 1.007
tuple_return_value gen 4 0 4 1.022
cgi gen 8 8 4 2.015

raw benchmark files