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
classes gen 0 4 27 0.000
fib_recursive gen 7 11 883 0.008
fib_iter gen 8 8 899 0.008
modules gen 2 2 178 0.011
loops gen 4 3 299 0.014
asdl_generated gen 11 11 405 0.027
parse gen 22 27 789 0.028
scoped_resource gen 48 37 1,049 0.046
files gen 4 8 76 0.049
containers gen 8 4 102 0.080
tuple_return_value gen 20 15 186 0.109
length gen 32 41 205 0.157
cartesian gen 89 74 325 0.275
escape gen 99 95 354 0.280
cgi gen 253 257 512 0.494
varargs gen 27 20 16 1.742
control_flow gen 209 161 111 1.892
gc_stack_roots gen 0 2 0 NA

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.9 0.41
cgi gen 3.4 3.5 7.1 0.48
cartesian gen 3.5 3.7 7.1 0.50
scoped_resource gen 3.5 3.5 7.1 0.50
asdl_generated gen 3.5 3.8 6.9 0.51
gc_stack_roots gen 3.5 3.4 6.9 0.51
parse gen 3.9 3.8 7.6 0.52
modules gen 3.7 3.8 7.1 0.52
escape gen 3.7 3.5 6.9 0.53
fib_recursive gen 3.7 3.7 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
tuple_return_value gen 3.8 3.8 7.1 0.54
control_flow gen 3.8 3.7 6.9 0.55
fib_iter gen 3.8 3.7 6.9 0.55
files gen 3.8 3.7 6.9 0.55
length gen 3.8 3.8 6.9 0.55
containers gen 28.8 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 0 4 0.000
fib_iter gen 0 0 8 0.000
modules gen 0 0 8 0.000
scoped_resource gen 0 8 4 0.000
tuple_return_value gen 0 4 8 0.000
gc_stack_roots gen 2 0 12 0.180
containers gen 8 11 35 0.230
varargs gen 39 47 59 0.663
classes gen 3 0 4 0.855
fib_recursive gen 4 0 4 0.910
control_flow gen 4 0 4 0.964
cartesian gen 8 12 8 0.979
escape gen 8 16 8 0.996
parse gen 7 0 4 1.869
length gen 12 4 4 3.009
files gen 4 0 0 inf
asdl_generated gen 0 0 0 NA
loops gen 0 0 0 NA

raw benchmark files