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_iter gen 3 8 912 0.003
modules gen 2 2 183 0.011
fib_recursive gen 11 11 901 0.012
loops gen 4 3 299 0.013
asdl_generated gen 11 11 380 0.029
parse gen 26 23 784 0.033
containers gen 4 4 106 0.038
scoped_resource gen 48 43 1,023 0.047
files gen 4 10 76 0.049
tuple_return_value gen 18 8 191 0.092
classes gen 3 0 33 0.104
gc_stack_roots gen 2 2 13 0.146
length gen 32 46 208 0.154
cartesian gen 85 74 339 0.252
escape gen 92 85 357 0.257
cgi gen 267 268 543 0.492
varargs gen 23 25 24 0.964
control_flow gen 209 161 113 1.849

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 12.2 0.36
gc_stack_roots gen 3.4 3.5 8.4 0.41
cartesian gen 3.5 3.7 8.4 0.42
modules gen 3.7 3.8 8.7 0.42
asdl_generated gen 3.7 3.5 8.5 0.43
scoped_resource gen 3.7 3.7 8.5 0.43
parse gen 3.9 3.9 9.0 0.43
cgi gen 3.7 3.7 8.4 0.44
escape gen 3.7 3.7 8.4 0.44
fib_recursive gen 3.7 3.8 8.4 0.44
fib_iter gen 3.8 3.8 8.5 0.45
loops gen 3.8 3.5 8.5 0.45
tuple_return_value gen 3.8 3.7 8.5 0.45
files gen 3.8 3.7 8.4 0.45
length gen 3.8 3.8 8.4 0.45
control_flow gen 3.9 3.9 8.4 0.47
containers gen 28.6 28.5 49.1 0.58
varargs gen 5.5 5.4 8.5 0.65

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 12 0.000
classes gen 0 3 8 0.000
control_flow gen 0 0 12 0.000
fib_recursive gen 0 0 12 0.000
gc_stack_roots gen 0 0 8 0.000
loops gen 0 0 12 0.000
modules gen 0 0 8 0.000
scoped_resource gen 0 4 16 0.000
containers gen 12 11 43 0.283
tuple_return_value gen 4 12 8 0.443
files gen 4 0 8 0.468
fib_iter gen 5 0 8 0.662
varargs gen 43 42 57 0.758
parse gen 4 4 4 0.914
cgi gen 4 0 4 0.998
cartesian gen 8 12 8 1.021
escape gen 16 19 12 1.340
length gen 12 0 8 1.505

raw benchmark files