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 2 174 0.000
fib_iter gen 8 8 894 0.009
fib_recursive gen 11 11 888 0.012
loops gen 4 3 290 0.013
asdl_generated gen 11 11 384 0.028
parse gen 26 23 770 0.034
scoped_resource gen 44 42 1,041 0.042
files gen 4 4 68 0.053
containers gen 8 7 129 0.060
classes gen 3 3 31 0.104
tuple_return_value gen 20 15 195 0.105
length gen 44 36 207 0.215
cartesian gen 84 83 327 0.259
escape gen 101 97 361 0.280
gc_stack_roots gen 2 2 4 0.451
cgi gen 250 264 516 0.485
varargs gen 16 25 12 1.304
control_flow gen 207 162 111 1.864

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.8 0.41
parse gen 3.8 3.9 7.6 0.50
asdl_generated gen 3.5 3.7 6.9 0.51
escape gen 3.5 3.5 6.9 0.51
gc_stack_roots gen 3.5 3.4 6.9 0.51
cartesian gen 3.7 3.5 7.1 0.52
length gen 3.7 3.8 7.1 0.52
fib_iter gen 3.7 3.8 6.9 0.53
tuple_return_value gen 3.7 3.7 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
scoped_resource gen 3.8 3.7 7.1 0.54
control_flow gen 3.8 3.8 6.9 0.55
fib_recursive gen 3.8 3.8 6.9 0.55
files gen 3.8 3.8 6.9 0.55
modules gen 3.8 3.7 6.9 0.55
cgi gen 3.7 3.5 6.7 0.55
containers gen 28.5 28.5 47.6 0.60
varargs gen 5.5 5.4 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
fib_iter gen 0 0 4 0.000
gc_stack_roots gen 0 0 8 0.000
length gen 0 8 8 0.000
loops gen 0 0 8 0.000
tuple_return_value gen 0 4 4 0.000
modules gen 2 0 8 0.235
files gen 4 4 8 0.446
containers gen 8 7 16 0.481
cgi gen 4 4 8 0.497
escape gen 4 4 8 0.503
varargs gen 51 42 60 0.848
parse gen 4 4 4 0.926
scoped_resource gen 4 4 4 0.988
control_flow gen 4 0 4 1.004
cartesian gen 8 4 4 1.994
classes gen 0 0 0 NA
fib_recursive gen 0 0 0 NA

raw benchmark files