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
files gen 0 7 68 0.000
gc_stack_roots gen 0 0 4 0.000
fib_iter gen 8 4 890 0.008
modules gen 2 2 173 0.011
fib_recursive gen 11 7 891 0.012
loops gen 4 3 290 0.013
asdl_generated gen 11 11 378 0.028
scoped_resource gen 37 46 1,019 0.036
parse gen 30 27 777 0.038
tuple_return_value gen 14 18 188 0.073
containers gen 12 4 129 0.091
classes gen 3 3 30 0.104
length gen 44 32 204 0.217
cartesian gen 88 87 327 0.268
escape gen 101 100 342 0.295
cgi gen 270 263 520 0.519
varargs gen 15 21 28 0.556
control_flow gen 209 155 110 1.901

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.9 0.41
parse gen 3.7 3.8 7.5 0.49
gc_stack_roots gen 3.4 3.4 6.8 0.50
modules gen 3.5 3.7 7.1 0.50
cgi gen 3.7 3.7 7.1 0.52
tuple_return_value gen 3.7 3.7 7.1 0.52
asdl_generated gen 3.7 3.5 6.9 0.53
cartesian gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
files gen 3.7 3.8 6.9 0.53
loops gen 3.8 3.9 7.1 0.54
scoped_resource gen 3.8 3.7 7.1 0.54
control_flow gen 3.8 3.9 6.9 0.55
fib_iter gen 3.8 3.8 6.9 0.55
fib_recursive gen 3.8 3.8 6.9 0.55
length gen 3.8 3.8 6.8 0.56
containers gen 28.6 28.4 47.6 0.60
varargs gen 5.5 5.4 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
control_flow gen 0 4 4 0.000
fib_iter gen 0 4 4 0.000
fib_recursive gen 0 4 4 0.000
length gen 0 12 4 0.000
loops gen 0 0 12 0.000
modules gen 0 0 8 0.000
parse gen 0 0 4 0.000
gc_stack_roots gen 2 2 8 0.227
containers gen 4 11 12 0.322
cartesian gen 4 0 8 0.499
files gen 7 0 8 0.882
escape gen 4 4 4 1.003
varargs gen 50 45 44 1.150
scoped_resource gen 12 0 8 1.529
tuple_return_value gen 7 0 4 1.708
cgi gen 0 4 0 NA
classes gen 0 0 0 NA

raw benchmark files