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 878 0.008
fib_iter gen 8 8 887 0.009
modules gen 2 2 175 0.010
loops gen 4 3 339 0.011
asdl_generated gen 7 11 373 0.019
parse gen 29 23 767 0.038
scoped_resource gen 45 38 1,041 0.043
files gen 4 7 72 0.053
tuple_return_value gen 20 18 185 0.111
containers gen 15 4 126 0.120
classes gen 3 0 23 0.136
length gen 36 41 207 0.176
gc_stack_roots gen 2 2 8 0.216
cartesian gen 85 83 330 0.256
escape gen 92 95 348 0.265
cgi gen 269 260 520 0.518
varargs gen 37 23 40 0.935
control_flow gen 208 165 110 1.893

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
fib_iter gen 3.4 3.8 6.9 0.49
cartesian gen 3.5 3.5 7.1 0.50
loops gen 3.5 3.8 7.1 0.50
parse gen 3.8 3.8 7.5 0.51
cgi gen 3.5 3.7 6.9 0.51
files gen 3.5 3.8 6.9 0.51
gc_stack_roots gen 3.5 3.5 6.9 0.51
length gen 3.5 3.8 6.9 0.51
asdl_generated 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.8 6.9 0.53
scoped_resource gen 3.8 3.7 7.1 0.54
modules 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.9 7.1 0.56
containers gen 28.5 28.5 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
cgi gen 0 8 8 0.000
classes gen 0 3 8 0.000
containers gen 0 11 8 0.000
fib_iter gen 0 0 12 0.000
gc_stack_roots gen 0 0 4 0.000
modules gen 0 0 8 0.000
parse gen 0 4 8 0.000
tuple_return_value gen 0 0 8 0.000
asdl_generated gen 4 0 8 0.444
fib_recursive gen 4 0 4 0.888
varargs gen 29 43 32 0.909
files gen 4 0 4 0.954
control_flow gen 4 0 4 1.019
length gen 8 4 4 1.990
cartesian gen 8 4 4 2.025
escape gen 12 8 4 3.004
scoped_resource gen 4 8 0 inf
loops gen 0 0 0 NA

raw benchmark files