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 0 28 0.000
gc_stack_roots gen 0 0 12 0.000
fib_iter gen 8 4 887 0.009
modules gen 2 2 171 0.011
fib_recursive gen 11 11 886 0.012
loops gen 4 3 289 0.013
asdl_generated gen 11 8 378 0.029
parse gen 26 28 771 0.033
scoped_resource gen 40 34 1,042 0.038
containers gen 4 10 112 0.038
files gen 4 4 65 0.061
tuple_return_value gen 14 18 188 0.076
length gen 44 41 201 0.221
cartesian gen 88 76 334 0.262
escape gen 100 101 345 0.291
cgi gen 255 269 508 0.501
varargs gen 24 16 31 0.768
control_flow gen 206 162 106 1.945

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.7 0.40
gc_stack_roots gen 3.4 3.4 6.9 0.49
parse gen 3.8 3.8 7.6 0.50
asdl_generated gen 3.5 3.7 6.9 0.51
cgi gen 3.7 3.7 7.1 0.52
fib_iter gen 3.7 3.8 7.1 0.52
cartesian gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
fib_recursive gen 3.7 3.8 6.9 0.53
modules gen 3.7 3.8 6.9 0.53
control_flow gen 3.8 3.7 7.1 0.54
loops gen 3.8 3.7 7.1 0.54
scoped_resource gen 3.8 3.7 7.1 0.54
tuple_return_value gen 3.7 3.7 6.8 0.54
files gen 3.8 3.7 6.9 0.55
length gen 3.8 3.7 6.8 0.56
containers gen 28.5 28.4 47.8 0.60
varargs gen 5.4 5.4 6.9 0.77

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 4 4 0.000
cgi gen 0 0 4 0.000
fib_iter gen 0 4 4 0.000
fib_recursive gen 0 0 12 0.000
length gen 0 4 8 0.000
loops gen 0 0 8 0.000
modules gen 0 0 12 0.000
escape gen 4 4 12 0.338
files gen 4 4 11 0.347
parse gen 4 0 12 0.357
containers gen 13 5 28 0.458
control_flow gen 4 0 8 0.486
classes gen 3 3 4 0.839
tuple_return_value gen 7 0 8 0.895
cartesian gen 8 12 8 1.000
varargs gen 43 52 42 1.024
gc_stack_roots gen 2 2 0 inf
scoped_resource gen 8 11 0 inf

raw benchmark files