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 0 20 0.000
modules gen 0 2 186 0.000
fib_iter gen 8 8 886 0.009
fib_recursive gen 11 11 933 0.012
loops gen 4 3 294 0.013
asdl_generated gen 7 7 395 0.018
parse gen 29 27 753 0.039
scoped_resource gen 44 34 1,028 0.043
files gen 4 8 64 0.059
tuple_return_value gen 16 18 181 0.090
containers gen 12 11 102 0.116
length gen 42 42 203 0.207
cartesian gen 76 75 316 0.242
escape gen 106 104 347 0.305
gc_stack_roots gen 2 0 4 0.443
cgi gen 254 253 516 0.493
varargs gen 27 8 20 1.347
control_flow gen 209 161 110 1.906

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.9 0.41
parse gen 3.7 3.8 7.6 0.48
gc_stack_roots gen 3.4 3.4 6.9 0.49
tuple_return_value gen 3.5 3.8 7.1 0.50
cartesian gen 3.5 3.5 6.9 0.51
cgi gen 3.7 3.7 6.9 0.53
scoped_resource gen 3.7 3.8 6.9 0.53
control_flow gen 3.8 3.8 7.1 0.54
length gen 3.8 3.7 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
asdl_generated gen 3.7 3.5 6.8 0.54
escape gen 3.8 3.5 6.9 0.55
fib_recursive gen 3.8 3.8 6.9 0.55
files gen 3.8 3.7 6.9 0.55
modules gen 3.9 3.8 7.1 0.56
fib_iter gen 3.8 3.5 6.8 0.56
containers gen 28.6 28.7 47.6 0.60
varargs gen 5.4 5.5 7.1 0.76

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 0 4 0.000
control_flow gen 0 0 4 0.000
escape gen 0 8 4 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 0 4 0.000
gc_stack_roots gen 0 2 8 0.000
loops gen 0 0 4 0.000
parse gen 0 0 12 0.000
containers gen 4 4 37 0.107
classes gen 3 4 12 0.270
files gen 4 0 12 0.312
scoped_resource gen 4 11 12 0.333
tuple_return_value gen 4 0 12 0.345
varargs gen 39 58 53 0.740
asdl_generated gen 4 4 4 0.900
length gen 4 4 4 1.054
cartesian gen 16 12 12 1.341
modules gen 2 0 0 inf

raw benchmark files