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 175 0.000
fib_iter gen 4 8 894 0.004
fib_recursive gen 11 11 895 0.012
loops gen 4 3 292 0.013
asdl_generated gen 11 11 396 0.027
parse gen 29 24 776 0.038
scoped_resource gen 48 46 1,060 0.045
tuple_return_value gen 12 18 186 0.066
containers gen 8 9 107 0.071
files gen 7 7 77 0.097
classes gen 3 3 26 0.123
length gen 40 45 218 0.184
gc_stack_roots gen 2 0 8 0.224
escape gen 97 104 350 0.276
cartesian gen 92 86 324 0.285
varargs gen 12 25 32 0.366
cgi gen 263 260 520 0.505
control_flow gen 209 157 110 1.890

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.8 0.40
loops gen 3.5 3.8 7.1 0.50
parse gen 3.9 3.8 7.7 0.51
escape gen 3.5 3.8 6.9 0.51
files gen 3.5 3.7 6.9 0.51
gc_stack_roots gen 3.5 3.5 6.9 0.51
cartesian gen 3.7 3.5 6.9 0.53
cgi gen 3.7 3.7 6.9 0.53
tuple_return_value gen 3.7 3.8 6.9 0.53
scoped_resource gen 3.8 3.8 7.1 0.54
asdl_generated gen 3.7 3.7 6.8 0.54
control_flow gen 3.8 3.9 6.9 0.55
fib_iter gen 3.8 3.5 6.9 0.55
fib_recursive gen 3.8 3.5 6.9 0.55
length gen 3.8 3.7 6.9 0.55
modules gen 3.8 3.7 6.9 0.55
containers gen 28.5 28.7 47.5 0.60
varargs gen 5.5 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 4 0.000
cartesian gen 0 0 8 0.000
classes gen 0 0 4 0.000
control_flow gen 0 4 4 0.000
fib_recursive gen 0 0 4 0.000
gc_stack_roots gen 0 2 4 0.000
loops gen 0 0 8 0.000
parse gen 0 4 12 0.000
modules gen 2 2 12 0.152
containers gen 8 4 28 0.275
cgi gen 8 8 12 0.669
fib_iter gen 4 0 4 0.943
escape gen 8 4 8 0.961
varargs gen 55 41 40 1.366
tuple_return_value gen 8 0 4 2.068
length gen 4 0 0 inf
files gen 0 0 0 NA
scoped_resource gen 0 0 0 NA

raw benchmark files