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_recursive gen 7 11 879 0.008
fib_iter gen 8 8 890 0.009
modules gen 2 0 180 0.012
loops gen 4 3 291 0.014
asdl_generated gen 8 7 379 0.020
parse gen 23 20 774 0.029
scoped_resource gen 44 46 1,052 0.042
containers gen 8 11 133 0.061
tuple_return_value gen 14 18 191 0.072
files gen 7 8 73 0.102
length gen 36 46 198 0.183
classes gen 3 0 16 0.198
cartesian gen 72 79 322 0.224
escape gen 105 106 346 0.302
gc_stack_roots gen 2 2 4 0.450
cgi gen 261 251 511 0.511
control_flow gen 210 158 113 1.867
varargs gen 23 17 12 2.004

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 10.8 0.41
escape gen 3.5 3.5 7.1 0.50
gc_stack_roots gen 3.5 3.5 7.1 0.50
cgi gen 3.5 3.7 6.9 0.51
parse gen 3.9 3.9 7.6 0.52
asdl_generated gen 3.7 3.5 7.1 0.52
cartesian gen 3.7 3.7 7.1 0.52
fib_iter gen 3.7 3.7 6.9 0.53
fib_recursive gen 3.7 3.7 6.9 0.53
loops gen 3.8 3.7 7.1 0.54
modules gen 3.8 3.8 7.1 0.54
length gen 3.8 3.7 6.9 0.55
scoped_resource gen 3.8 3.7 6.9 0.55
tuple_return_value gen 3.8 3.8 6.9 0.55
control_flow gen 3.9 3.8 7.1 0.56
files gen 3.8 3.7 6.8 0.56
containers gen 28.6 28.3 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 4 16 0.000
control_flow gen 0 4 4 0.000
escape gen 0 0 8 0.000
fib_iter gen 0 0 8 0.000
files gen 0 0 4 0.000
gc_stack_roots gen 0 0 8 0.000
loops gen 0 0 4 0.000
modules gen 0 2 8 0.000
scoped_resource gen 4 0 12 0.332
fib_recursive gen 4 0 8 0.453
asdl_generated gen 4 4 8 0.472
containers gen 8 4 12 0.667
length gen 8 0 12 0.679
varargs gen 43 50 62 0.689
cgi gen 8 4 8 1.006
tuple_return_value gen 7 0 4 1.720
cartesian gen 20 8 8 2.487
parse gen 8 8 0 inf

raw benchmark files