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 3 20 0.000
loops gen 0 3 291 0.000
fib_iter gen 8 8 879 0.009
modules gen 2 0 171 0.011
fib_recursive gen 11 11 878 0.012
asdl_generated gen 11 7 421 0.027
parse gen 25 23 763 0.033
scoped_resource gen 45 46 1,035 0.043
containers gen 8 10 111 0.073
tuple_return_value gen 20 19 195 0.104
files gen 7 4 69 0.109
length gen 34 40 205 0.164
gc_stack_roots gen 2 0 8 0.225
cartesian gen 83 84 324 0.257
escape gen 107 104 343 0.312
cgi gen 268 263 519 0.517
varargs gen 24 0 23 1.018
control_flow gen 209 155 112 1.873

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.6 4.5 10.8 0.43
parse gen 3.8 3.7 7.6 0.50
tuple_return_value gen 3.5 3.7 7.1 0.50
asdl_generated gen 3.5 3.8 6.9 0.51
cartesian gen 3.5 3.5 6.9 0.51
gc_stack_roots gen 3.5 3.4 6.9 0.51
scoped_resource gen 3.5 3.7 6.9 0.51
cgi gen 3.7 3.8 6.9 0.53
escape gen 3.7 3.5 6.9 0.53
fib_iter gen 3.7 3.8 6.9 0.53
fib_recursive gen 3.7 3.7 6.9 0.53
length gen 3.7 3.8 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
modules gen 3.8 3.7 7.1 0.54
control_flow gen 3.8 3.8 6.9 0.55
files gen 3.8 3.8 6.9 0.55
containers gen 28.5 28.5 47.6 0.60
varargs gen 5.6 5.4 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 4 4 0.000
control_flow gen 0 4 4 0.000
escape gen 0 4 8 0.000
fib_iter gen 0 0 12 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 4 8 0.000
gc_stack_roots gen 0 2 4 0.000
modules gen 0 2 12 0.000
tuple_return_value gen 0 0 8 0.000
classes gen 3 0 12 0.272
containers gen 8 5 28 0.294
scoped_resource gen 4 0 8 0.510
parse gen 4 4 8 0.521
varargs gen 44 67 51 0.862
loops gen 4 0 4 0.945
cartesian gen 8 0 8 0.990
length gen 11 4 4 2.791
cgi gen 0 4 0 NA

raw benchmark files