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 177 0.000
fib_iter gen 8 8 896 0.009
fib_recursive gen 11 11 892 0.012
loops gen 4 0 288 0.013
asdl_generated gen 7 7 367 0.019
parse gen 23 23 773 0.029
scoped_resource gen 44 42 1,049 0.042
containers gen 8 4 113 0.067
tuple_return_value gen 17 9 188 0.091
files gen 7 7 71 0.102
classes gen 3 3 23 0.145
length gen 33 45 196 0.166
cartesian gen 86 75 333 0.260
escape gen 100 84 342 0.291
gc_stack_roots gen 2 2 4 0.440
cgi gen 269 268 508 0.530
varargs gen 27 15 32 0.853
control_flow gen 207 157 109 1.900

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.6 0.42
parse gen 3.8 3.8 7.6 0.50
asdl_generated gen 3.5 3.7 6.9 0.51
cartesian gen 3.7 3.7 7.1 0.52
scoped_resource gen 3.7 3.7 7.1 0.52
tuple_return_value gen 3.7 3.7 7.1 0.52
cgi gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
gc_stack_roots gen 3.7 3.5 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
control_flow gen 3.7 3.8 6.8 0.54
fib_iter 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
length gen 3.8 3.8 6.9 0.55
modules gen 3.8 3.7 6.9 0.55
containers gen 28.7 28.5 47.6 0.60
varargs gen 5.5 5.6 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 0 8 0.000
control_flow gen 0 4 4 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 0 4 0.000
gc_stack_roots gen 0 0 8 0.000
loops gen 0 3 8 0.000
asdl_generated gen 4 4 12 0.299
containers gen 8 11 20 0.374
modules gen 2 0 4 0.443
escape gen 4 20 8 0.501
parse gen 8 4 12 0.636
tuple_return_value gen 3 9 4 0.855
varargs gen 39 50 40 0.975
cartesian gen 4 12 4 0.980
scoped_resource gen 4 4 4 1.002
length gen 12 0 12 1.019
cgi gen 0 0 0 NA
fib_iter gen 0 0 0 NA

raw benchmark files