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
gc_stack_roots gen 0 2 12 0.000
modules gen 2 2 179 0.010
fib_iter gen 10 8 887 0.011
fib_recursive gen 11 11 925 0.012
loops gen 4 3 305 0.012
asdl_generated gen 11 11 383 0.028
parse gen 26 27 772 0.034
scoped_resource gen 39 35 1,037 0.038
containers gen 6 8 122 0.052
files gen 7 8 73 0.101
tuple_return_value gen 21 15 182 0.113
length gen 37 44 211 0.174
classes gen 3 3 16 0.210
cartesian gen 77 96 327 0.236
escape gen 97 96 354 0.273
cgi gen 254 265 510 0.498
varargs gen 12 29 20 0.624
control_flow gen 209 157 107 1.949

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
cgi gen 3.4 3.7 6.9 0.49
parse gen 3.8 3.8 7.7 0.49
escape gen 3.5 3.7 6.9 0.51
gc_stack_roots gen 3.5 3.4 6.9 0.51
scoped_resource gen 3.7 3.7 7.1 0.52
asdl_generated gen 3.7 3.7 6.9 0.53
cartesian gen 3.7 3.5 6.9 0.53
modules gen 3.7 3.8 6.9 0.53
tuple_return_value gen 3.7 3.7 6.9 0.53
fib_iter gen 3.8 3.8 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
fib_recursive gen 3.8 3.7 6.9 0.55
files gen 3.8 3.8 6.9 0.55
length gen 3.8 3.8 6.9 0.55
control_flow gen 3.9 3.7 6.9 0.57
containers gen 28.6 28.5 47.6 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
cgi gen 0 4 8 0.000
classes gen 0 0 16 0.000
control_flow gen 0 4 8 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 12 0.000
files gen 0 0 4 0.000
loops gen 0 0 8 0.000
modules gen 0 0 4 0.000
tuple_return_value gen 0 4 12 0.000
parse gen 4 0 16 0.231
containers gen 9 8 16 0.599
scoped_resource gen 8 12 12 0.660
varargs gen 54 38 52 1.040
cartesian gen 15 4 8 1.938
escape gen 8 8 4 2.000
gc_stack_roots gen 2 0 0 inf
length gen 8 0 0 inf

raw benchmark files