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 3 24 0.000
gc_stack_roots gen 0 2 8 0.000
fib_recursive gen 7 11 883 0.008
fib_iter gen 8 8 899 0.009
modules gen 2 2 179 0.010
loops gen 4 3 306 0.012
asdl_generated gen 11 11 388 0.028
parse gen 26 23 762 0.034
scoped_resource gen 48 34 1,037 0.047
tuple_return_value gen 16 19 182 0.089
files gen 8 8 72 0.107
containers gen 16 11 122 0.131
length gen 42 38 195 0.215
cartesian gen 75 80 324 0.233
escape gen 101 105 349 0.289
cgi gen 258 268 514 0.502
varargs gen 13 12 12 1.081
control_flow gen 203 161 108 1.879

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.3 10.7 0.41
asdl_generated gen 3.5 3.7 7.1 0.50
gc_stack_roots gen 3.5 3.5 7.1 0.50
scoped_resource gen 3.5 3.7 7.1 0.50
parse gen 3.8 3.9 7.5 0.51
loops gen 3.8 3.5 7.2 0.53
cartesian gen 3.7 3.5 6.9 0.53
cgi gen 3.7 3.5 6.9 0.53
fib_iter gen 3.8 3.9 7.1 0.54
control_flow gen 3.7 3.9 6.8 0.54
escape gen 3.8 3.7 6.9 0.55
fib_recursive 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
tuple_return_value gen 3.8 3.7 6.9 0.55
files gen 3.8 3.8 6.8 0.56
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 8 0.000
containers gen 0 4 16 0.000
fib_iter gen 0 0 4 0.000
files gen 0 0 4 0.000
loops gen 0 0 8 0.000
modules gen 0 0 4 0.000
scoped_resource gen 0 11 12 0.000
length gen 4 8 16 0.263
tuple_return_value gen 4 0 12 0.340
classes gen 3 0 8 0.411
fib_recursive gen 4 0 8 0.452
parse gen 4 4 8 0.458
cgi gen 4 0 8 0.494
escape gen 4 4 8 0.508
gc_stack_roots gen 2 0 4 0.513
varargs gen 54 54 62 0.879
control_flow gen 4 0 4 0.995
cartesian gen 16 4 8 1.983

raw benchmark files