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 174 0.000
fib_iter gen 8 8 901 0.008
fib_recursive gen 11 11 869 0.012
loops gen 4 3 293 0.013
asdl_generated gen 5 0 367 0.015
parse gen 30 23 787 0.038
scoped_resource gen 43 46 1,058 0.041
files gen 4 7 72 0.049
containers gen 12 9 112 0.104
tuple_return_value gen 21 18 188 0.110
classes gen 3 3 22 0.147
length gen 38 45 199 0.189
cartesian gen 80 79 321 0.250
escape gen 101 101 348 0.289
cgi gen 265 263 497 0.534
control_flow gen 209 162 106 1.978
varargs gen 25 8 8 3.095

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.3 10.8 0.41
parse gen 3.7 3.8 7.6 0.48
gc_stack_roots gen 3.5 3.5 7.1 0.50
scoped_resource gen 3.5 3.4 7.1 0.50
asdl_generated gen 3.7 3.7 7.1 0.52
loops gen 3.8 3.8 7.2 0.53
cartesian gen 3.7 3.5 6.9 0.53
control_flow gen 3.7 3.9 6.9 0.53
escape gen 3.7 3.5 6.9 0.53
fib_recursive gen 3.7 3.8 6.9 0.53
length gen 3.7 3.7 6.9 0.53
files gen 3.8 3.7 7.1 0.54
fib_iter gen 3.8 3.9 6.9 0.55
tuple_return_value gen 3.8 3.8 6.9 0.55
cgi gen 3.7 3.7 6.7 0.55
modules gen 3.9 3.8 6.9 0.57
containers gen 28.4 28.5 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
classes gen 0 0 9 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 12 0.000
loops gen 0 0 8 0.000
tuple_return_value gen 0 0 4 0.000
containers gen 4 5 24 0.162
modules gen 2 0 8 0.223
cgi gen 4 4 16 0.249
gc_stack_roots gen 2 0 8 0.250
escape gen 4 4 8 0.503
varargs gen 41 59 64 0.645
asdl_generated gen 5 11 8 0.667
files gen 4 0 4 0.890
length gen 8 0 8 0.947
scoped_resource gen 4 0 4 0.985
cartesian gen 12 8 12 1.015
parse gen 0 4 0 NA

raw benchmark files