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
classes gen 0 3 22 0.000
containers gen 0 4 107 0.000
modules gen 0 2 173 0.000
fib_iter gen 8 4 891 0.009
fib_recursive gen 11 11 878 0.012
loops gen 4 0 290 0.013
asdl_generated gen 11 7 379 0.029
scoped_resource gen 36 42 1,041 0.034
parse gen 30 27 774 0.038
tuple_return_value gen 12 18 185 0.067
files gen 8 8 73 0.104
length gen 41 44 203 0.203
cartesian gen 93 85 340 0.273
escape gen 98 92 333 0.294
gc_stack_roots gen 2 2 4 0.435
varargs gen 13 17 24 0.518
cgi gen 265 260 510 0.521
control_flow gen 208 161 106 1.954

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 10.9 0.41
escape gen 3.4 3.5 6.9 0.49
gc_stack_roots gen 3.5 3.4 7.1 0.50
parse gen 3.8 3.9 7.6 0.50
scoped_resource gen 3.7 3.7 7.1 0.52
fib_recursive gen 3.5 3.7 6.8 0.52
loops gen 3.8 3.7 7.2 0.53
cgi gen 3.7 3.5 6.9 0.53
length gen 3.7 3.7 6.9 0.53
control_flow gen 3.8 3.9 7.1 0.54
files gen 3.8 3.8 7.1 0.54
modules gen 3.8 3.7 7.1 0.54
tuple_return_value gen 3.8 3.8 7.1 0.54
asdl_generated gen 3.7 3.5 6.8 0.54
cartesian gen 3.7 3.5 6.8 0.54
fib_iter gen 3.8 3.8 6.9 0.55
containers gen 28.5 28.6 47.6 0.60
varargs gen 5.5 5.6 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 4 4 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 4 8 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 0 4 0.000
gc_stack_roots gen 0 0 8 0.000
loops gen 0 3 8 0.000
parse gen 0 0 8 0.000
modules gen 2 0 12 0.160
cgi gen 4 8 12 0.332
classes gen 3 0 9 0.362
escape gen 8 12 16 0.514
containers gen 16 11 32 0.515
length gen 4 0 8 0.519
cartesian gen 8 4 8 1.009
tuple_return_value gen 8 0 8 1.022
varargs gen 54 50 48 1.122
scoped_resource gen 12 4 8 1.486

raw benchmark files