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
gc_stack_roots gen 0 2 4 0.000
modules gen 0 2 177 0.000
fib_iter gen 4 8 889 0.004
fib_recursive gen 7 11 913 0.008
loops gen 4 3 290 0.013
asdl_generated gen 7 7 388 0.018
parse gen 25 27 762 0.033
scoped_resource gen 48 46 1,059 0.045
tuple_return_value gen 17 14 178 0.096
containers gen 10 5 102 0.100
files gen 8 7 71 0.107
classes gen 3 0 23 0.140
length gen 45 44 206 0.219
cartesian gen 81 75 333 0.242
escape gen 100 88 361 0.278
cgi gen 269 269 588 0.458
control_flow gen 210 161 116 1.805
varargs gen 25 12 12 2.076

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.3 4.5 10.7 0.40
parse gen 3.8 3.7 7.5 0.51
fib_iter gen 3.5 3.8 6.9 0.51
gc_stack_roots gen 3.5 3.5 6.9 0.51
modules gen 3.7 3.8 7.1 0.52
loops gen 3.8 3.8 7.2 0.53
asdl_generated gen 3.7 3.7 6.9 0.53
cartesian gen 3.7 3.5 6.9 0.53
cgi gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
fib_recursive gen 3.7 3.7 6.9 0.53
scoped_resource gen 3.7 3.7 6.9 0.53
tuple_return_value gen 3.8 3.8 6.9 0.55
control_flow gen 3.9 3.8 7.1 0.56
length gen 3.8 3.8 6.8 0.56
files gen 3.9 3.9 6.8 0.58
containers gen 28.7 28.5 47.6 0.60
varargs gen 5.5 5.4 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 0 12 0.000
classes gen 0 3 8 0.000
control_flow gen 0 0 8 0.000
files gen 0 0 8 0.000
length gen 0 0 4 0.000
loops gen 0 0 8 0.000
scoped_resource gen 0 0 4 0.000
containers gen 5 10 32 0.162
gc_stack_roots gen 2 0 8 0.226
modules gen 2 0 8 0.226
tuple_return_value gen 3 5 12 0.287
parse gen 4 0 12 0.355
fib_iter gen 4 0 8 0.478
escape gen 4 16 8 0.500
varargs gen 41 54 60 0.692
asdl_generated gen 4 4 4 0.895
fib_recursive gen 4 0 4 0.936
cartesian gen 12 12 8 1.524

raw benchmark files