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 8 0.000
fib_iter gen 8 8 903 0.008
modules gen 2 0 178 0.010
fib_recursive gen 11 11 880 0.012
loops gen 4 3 286 0.015
asdl_generated gen 7 11 368 0.020
parse gen 30 23 772 0.038
scoped_resource gen 43 46 1,029 0.042
files gen 4 7 72 0.052
tuple_return_value gen 16 18 183 0.089
classes gen 3 3 19 0.169
containers gen 16 11 86 0.180
length gen 37 42 202 0.185
cartesian gen 80 71 332 0.242
escape gen 93 93 351 0.264
cgi gen 269 268 507 0.530
varargs gen 21 24 28 0.742
control_flow gen 208 165 105 1.980

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.8 0.40
parse gen 3.8 3.8 7.6 0.50
gc_stack_roots gen 3.5 3.4 6.9 0.51
loops gen 3.7 3.8 7.1 0.52
scoped_resource gen 3.7 3.8 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
cgi gen 3.7 3.5 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
fib_iter 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.7 6.9 0.55
length gen 3.8 3.8 6.9 0.55
modules gen 3.8 3.8 6.9 0.55
tuple_return_value gen 3.8 3.8 6.9 0.55
control_flow gen 3.9 3.9 7.1 0.56
containers gen 28.7 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
cgi gen 0 0 4 0.000
classes gen 0 0 12 0.000
containers gen 0 4 51 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 0 4 0.000
loops gen 0 0 8 0.000
modules gen 0 2 4 0.000
parse gen 0 4 8 0.000
asdl_generated gen 4 0 12 0.300
tuple_return_value gen 4 0 12 0.339
gc_stack_roots gen 2 0 4 0.453
files gen 4 0 4 0.937
scoped_resource gen 4 0 4 0.984
length gen 8 4 8 1.025
varargs gen 46 43 44 1.039
cartesian gen 12 16 8 1.507
escape gen 12 12 4 2.997

raw benchmark files