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
modules gen 0 0 174 0.000
fib_iter gen 8 8 882 0.009
fib_recursive gen 11 11 881 0.012
loops gen 4 3 295 0.013
asdl_generated gen 7 11 387 0.019
parse gen 22 23 780 0.028
scoped_resource gen 47 42 1,033 0.046
containers gen 8 5 122 0.063
tuple_return_value gen 17 15 188 0.091
files gen 7 4 72 0.103
classes gen 3 0 31 0.107
length gen 36 37 204 0.177
cartesian gen 84 79 329 0.256
escape gen 101 99 352 0.287
cgi gen 269 264 526 0.512
varargs gen 17 20 24 0.694
control_flow gen 204 161 101 2.020
gc_stack_roots gen 2 0 0 inf

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.3 10.7 0.40
gc_stack_roots gen 3.4 3.4 6.9 0.49
parse gen 3.8 3.9 7.7 0.49
asdl_generated gen 3.7 3.7 7.1 0.52
cgi gen 3.7 3.7 6.9 0.53
length gen 3.7 3.7 6.9 0.53
fib_iter gen 3.8 3.9 7.1 0.54
escape gen 3.7 3.7 6.8 0.54
fib_recursive gen 3.7 3.7 6.8 0.54
cartesian gen 3.8 3.7 6.9 0.55
control_flow gen 3.8 3.9 6.9 0.55
files gen 3.8 3.5 6.9 0.55
modules gen 3.8 3.8 6.9 0.55
scoped_resource gen 3.8 3.7 6.9 0.55
loops gen 3.9 3.8 7.1 0.56
tuple_return_value gen 3.8 3.5 6.8 0.56
containers gen 28.3 28.4 47.5 0.60
varargs gen 5.5 5.5 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 4 8 0.000
fib_iter gen 0 0 12 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 4 4 0.000
gc_stack_roots gen 0 2 12 0.000
scoped_resource gen 0 4 8 0.000
modules gen 2 2 8 0.224
control_flow gen 4 0 12 0.343
tuple_return_value gen 3 4 8 0.428
parse gen 7 4 12 0.615
containers gen 8 10 12 0.635
asdl_generated gen 4 0 4 0.890
escape gen 4 4 4 0.973
varargs gen 50 47 48 1.041
cartesian gen 8 8 4 2.000
length gen 8 8 4 2.009
classes gen 0 3 0 NA
loops gen 0 0 0 NA

raw benchmark files