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 31 0.000
gc_stack_roots gen 0 1 4 0.000
modules gen 2 1 146 0.011
fib_recursive gen 7 7 624 0.012
loops gen 3 2 202 0.013
asdl_generated gen 4 4 272 0.014
fib_iter gen 11 5 618 0.018
parse gen 17 15 549 0.031
scoped_resource gen 34 29 718 0.047
tuple_return_value gen 11 13 140 0.076
files gen 5 5 50 0.104
containers gen 10 8 87 0.113
length gen 31 27 147 0.212
cartesian gen 60 70 240 0.248
escape gen 104 72 253 0.412
cgi gen 182 190 358 0.507
varargs gen 19 28 23 0.819
control_flow gen 146 108 80 1.834

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 12.2 0.37
gc_stack_roots gen 3.6 3.6 8.6 0.42
asdl_generated gen 3.7 3.9 8.7 0.42
parse gen 3.9 3.8 9.1 0.42
cartesian gen 3.7 3.7 8.6 0.43
cgi gen 3.7 3.8 8.5 0.43
escape gen 3.7 3.7 8.5 0.43
fib_recursive gen 3.8 3.8 8.7 0.44
scoped_resource gen 3.8 3.8 8.7 0.44
loops gen 3.8 3.9 8.7 0.44
fib_iter gen 3.8 3.8 8.6 0.44
modules gen 3.8 3.8 8.5 0.44
tuple_return_value gen 3.9 3.8 8.7 0.44
length gen 3.9 3.8 8.5 0.46
control_flow gen 3.9 3.9 8.5 0.46
files gen 4.0 3.9 8.6 0.46
containers gen 28.5 28.5 49.1 0.58
varargs gen 5.6 5.6 8.6 0.65

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
control_flow gen 0 4 8 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 0 8 0.000
length gen 0 4 4 0.000
loops gen 0 0 12 0.000
modules gen 0 0 8 0.000
scoped_resource gen 0 4 8 0.000
gc_stack_roots gen 1 0 9 0.149
containers gen 3 4 16 0.207
classes gen 3 3 11 0.224
cartesian gen 4 8 12 0.330
parse gen 3 4 8 0.425
asdl_generated gen 4 4 8 0.468
varargs gen 27 16 31 0.860
cgi gen 4 0 4 1.015
tuple_return_value gen 4 0 0 inf
escape gen 0 0 0 NA

raw benchmark files