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
gc_stack_roots gen 0 0 8 0.000
fib_recursive gen 7 11 907 0.008
fib_iter gen 7 8 904 0.008
modules gen 2 2 189 0.009
loops gen 4 3 310 0.012
asdl_generated gen 11 4 384 0.028
parse gen 27 19 788 0.034
scoped_resource gen 43 42 1,026 0.042
files gen 7 4 80 0.089
tuple_return_value gen 19 18 194 0.099
containers gen 12 14 115 0.101
classes gen 3 0 23 0.138
length gen 45 41 219 0.206
cartesian gen 86 82 335 0.258
escape gen 97 106 364 0.266
cgi gen 250 255 528 0.474
varargs gen 19 19 12 1.622
control_flow gen 208 158 120 1.732
pea_hello gen NA NA 14 NA

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 12.3 0.36
gc_stack_roots gen 3.4 3.5 8.5 0.40
parse gen 3.8 3.9 9.1 0.42
escape gen 3.5 3.5 8.4 0.42
cartesian gen 3.7 3.7 8.5 0.43
cgi gen 3.7 3.7 8.5 0.43
fib_iter gen 3.7 3.8 8.5 0.43
tuple_return_value gen 3.7 3.8 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
scoped_resource gen 3.7 3.5 8.4 0.44
control_flow gen 3.8 3.8 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
modules gen 3.8 3.8 8.5 0.45
fib_recursive gen 3.8 3.5 8.4 0.45
files gen 3.8 3.7 8.4 0.45
length gen 3.8 3.8 8.4 0.45
containers gen 28.5 28.7 49.1 0.58
varargs gen 5.5 5.5 8.4 0.66
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 8 8 0.000
classes gen 0 3 15 0.000
control_flow gen 0 4 4 0.000
files gen 0 4 4 0.000
length gen 0 4 4 0.000
modules gen 0 0 8 0.000
tuple_return_value gen 0 0 4 0.000
containers gen 4 0 28 0.139
gc_stack_roots gen 2 2 12 0.152
fib_recursive gen 4 0 8 0.447
parse gen 4 8 8 0.475
cartesian gen 4 4 8 0.517
scoped_resource gen 8 4 12 0.648
varargs gen 46 46 68 0.687
cgi gen 4 0 4 0.992
escape gen 8 0 8 1.008
fib_iter gen 0 0 0 NA
loops gen 0 0 0 NA
pea_hello gen NA NA 5 NA

raw benchmark files