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 23 0.000
loops gen 0 0 303 0.000
fib_iter gen 8 8 890 0.008
modules gen 2 2 174 0.010
fib_recursive gen 11 7 876 0.012
asdl_generated gen 11 11 401 0.027
parse gen 25 27 781 0.032
scoped_resource gen 48 46 1,051 0.046
files gen 4 8 73 0.052
containers gen 8 5 118 0.065
tuple_return_value gen 20 14 193 0.106
length gen 41 42 203 0.203
cartesian gen 84 78 388 0.217
escape gen 101 104 345 0.294
gc_stack_roots gen 2 2 4 0.457
cgi gen 254 247 511 0.498
varargs gen 16 16 16 0.967
control_flow gen 203 161 109 1.858

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
escape gen 3.5 3.7 6.9 0.51
gc_stack_roots gen 3.5 3.5 6.9 0.51
asdl_generated gen 3.7 3.7 7.1 0.52
loops gen 3.7 3.8 7.1 0.52
scoped_resource gen 3.7 3.8 7.1 0.52
tuple_return_value gen 3.7 3.8 7.1 0.52
cartesian gen 3.7 3.5 6.9 0.53
cgi gen 3.7 3.5 6.9 0.53
files gen 3.7 3.8 6.9 0.53
modules gen 3.7 3.8 6.9 0.53
fib_recursive gen 3.8 3.5 7.1 0.54
fib_iter 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.8 7.1 0.56
containers gen 28.6 28.7 47.6 0.60
varargs gen 5.4 5.5 6.9 0.77

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 8 4 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 4 8 0.000
gc_stack_roots gen 0 0 8 0.000
modules gen 0 0 8 0.000
scoped_resource gen 0 0 8 0.000
tuple_return_value gen 0 5 8 0.000
escape gen 4 0 12 0.341
containers gen 8 10 20 0.393
length gen 4 4 8 0.461
classes gen 4 3 8 0.478
varargs gen 51 49 56 0.898
files gen 4 0 4 0.931
control_flow gen 4 0 4 0.984
cartesian gen 8 8 0 inf
loops gen 4 3 0 inf
parse gen 4 0 0 inf

raw benchmark files