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
fib_iter gen 8 8 887 0.008
modules gen 2 2 179 0.010
fib_recursive gen 11 11 888 0.012
loops gen 4 3 290 0.013
asdl_generated gen 11 11 382 0.028
parse gen 26 27 761 0.034
scoped_resource gen 45 41 1,035 0.043
files gen 4 7 72 0.051
containers gen 8 4 116 0.065
tuple_return_value gen 16 15 188 0.088
classes gen 3 0 26 0.122
length gen 40 45 209 0.192
escape gen 97 104 351 0.276
cartesian gen 92 88 325 0.283
cgi gen 269 265 506 0.531
control_flow gen 211 158 104 2.026
varargs gen 27 15 12 2.264
gc_stack_roots gen 2 2 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.5 4.5 10.7 0.41
gc_stack_roots gen 3.5 3.4 7.1 0.50
parse gen 3.8 3.8 7.6 0.50
scoped_resource gen 3.7 3.7 7.2 0.51
cartesian gen 3.5 3.5 6.9 0.51
fib_recursive gen 3.5 3.7 6.9 0.51
loops gen 3.8 3.8 7.2 0.53
cgi gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
modules gen 3.7 3.7 6.9 0.53
tuple_return_value gen 3.7 3.7 6.9 0.53
asdl_generated gen 3.8 3.5 7.1 0.54
length gen 3.8 3.8 7.1 0.54
fib_iter gen 3.8 3.7 6.9 0.55
files gen 3.8 3.9 6.9 0.55
control_flow gen 3.9 3.8 6.9 0.57
containers gen 28.7 28.5 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
cgi gen 0 4 4 0.000
classes gen 0 3 4 0.000
control_flow gen 0 4 8 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 8 0.000
gc_stack_roots gen 0 0 12 0.000
loops gen 0 0 4 0.000
modules gen 0 0 4 0.000
scoped_resource gen 4 4 16 0.254
parse gen 4 0 12 0.308
containers gen 8 11 20 0.378
varargs gen 39 50 60 0.647
files gen 4 0 4 0.914
escape gen 8 0 8 1.011
tuple_return_value gen 4 4 4 1.031
length gen 4 0 0 inf

raw benchmark files