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 4 884 0.004
modules gen 2 2 174 0.010
fib_recursive gen 11 11 880 0.012
asdl_generated gen 5 7 408 0.013
loops gen 4 3 290 0.013
parse gen 17 27 778 0.022
containers gen 4 0 122 0.031
scoped_resource gen 44 41 1,028 0.042
files gen 4 7 67 0.054
tuple_return_value gen 16 18 188 0.087
classes gen 3 3 19 0.163
length gen 36 44 198 0.183
cartesian gen 88 72 333 0.265
escape gen 116 91 349 0.332
gc_stack_roots gen 2 2 4 0.453
cgi gen 265 260 505 0.525
varargs gen 21 16 28 0.741
control_flow gen 208 158 109 1.914

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.6 4.5 10.7 0.43
parse gen 3.7 3.7 7.7 0.47
gc_stack_roots gen 3.4 3.5 6.9 0.49
cgi gen 3.5 3.7 6.9 0.51
cartesian gen 3.7 3.5 7.1 0.52
modules gen 3.7 3.5 7.1 0.52
asdl_generated gen 3.7 3.5 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
fib_iter gen 3.7 3.7 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
tuple_return_value gen 3.8 3.7 7.1 0.54
control_flow gen 3.8 3.8 6.9 0.55
fib_recursive gen 3.8 3.7 6.9 0.55
files gen 3.8 3.7 6.9 0.55
length gen 3.8 3.9 6.9 0.55
scoped_resource gen 3.8 3.7 6.9 0.55
containers gen 28.5 28.5 47.6 0.60
varargs gen 5.5 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 0 11 0.000
control_flow gen 0 4 4 0.000
fib_recursive gen 0 0 8 0.000
gc_stack_roots gen 0 0 8 0.000
loops gen 0 0 8 0.000
modules gen 0 0 8 0.000
fib_iter gen 4 4 12 0.316
cgi gen 4 8 12 0.337
files gen 4 0 8 0.461
scoped_resource gen 4 4 8 0.495
cartesian gen 4 16 8 0.506
length gen 8 0 12 0.677
containers gen 11 14 12 0.934
tuple_return_value gen 4 0 4 1.020
varargs gen 45 49 44 1.038
asdl_generated gen 5 4 4 1.331
escape gen 12 12 4 2.993
parse gen 13 0 4 3.164

raw benchmark files