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 886 0.008
fib_iter gen 8 8 889 0.008
modules gen 2 2 174 0.010
loops gen 4 0 289 0.013
asdl_generated gen 11 11 381 0.028
parse gen 27 19 768 0.035
scoped_resource gen 39 38 1,088 0.036
containers gen 8 7 108 0.072
files gen 7 4 68 0.107
tuple_return_value gen 20 15 189 0.108
classes gen 3 3 19 0.166
length gen 41 36 198 0.205
gc_stack_roots gen 2 0 8 0.217
cartesian gen 84 87 328 0.255
escape gen 97 96 350 0.279
cgi gen 269 264 505 0.532
varargs gen 31 8 19 1.646
control_flow gen 207 164 119 1.744

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

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 4 0.000
cgi gen 0 4 8 0.000
classes gen 0 0 11 0.000
fib_iter gen 0 0 8 0.000
files gen 0 4 8 0.000
gc_stack_roots gen 0 2 4 0.000
loops gen 0 3 8 0.000
modules gen 0 0 8 0.000
tuple_return_value gen 0 4 4 0.000
containers gen 8 7 28 0.277
parse gen 4 8 12 0.323
length gen 4 8 12 0.341
fib_recursive gen 4 0 8 0.445
varargs gen 35 58 53 0.661
escape gen 8 8 8 0.970
scoped_resource gen 8 8 4 1.966
cartesian gen 8 0 4 1.992
control_flow gen 0 0 0 NA

raw benchmark files