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
fib_iter gen 8 4 894 0.009
modules gen 2 2 188 0.009
fib_recursive gen 11 11 880 0.012
loops gen 4 3 289 0.013
asdl_generated gen 7 7 392 0.018
parse gen 23 27 776 0.029
scoped_resource gen 44 38 1,026 0.042
tuple_return_value gen 15 18 198 0.078
files gen 7 4 75 0.097
containers gen 12 4 115 0.106
gc_stack_roots gen 2 2 16 0.111
classes gen 3 3 28 0.121
length gen 40 42 208 0.193
escape gen 104 95 360 0.290
cartesian gen 103 86 333 0.310
cgi gen 267 263 531 0.502
varargs gen 35 27 24 1.451
control_flow gen 205 162 110 1.857
pea_hello gen NA NA 7 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.6 4.5 12.3 0.37
scoped_resource gen 3.5 3.8 8.5 0.42
cartesian gen 3.5 3.7 8.4 0.42
gc_stack_roots gen 3.5 3.4 8.4 0.42
escape gen 3.7 3.8 8.5 0.43
parse gen 3.9 3.9 9.1 0.43
asdl_generated gen 3.7 3.5 8.4 0.44
cgi gen 3.7 3.5 8.4 0.44
control_flow gen 3.8 3.9 8.5 0.45
files gen 3.8 3.8 8.5 0.45
length gen 3.8 3.8 8.5 0.45
loops gen 3.8 3.7 8.5 0.45
fib_iter gen 3.8 3.8 8.4 0.45
fib_recursive gen 3.8 3.7 8.4 0.45
tuple_return_value gen 3.8 3.9 8.4 0.45
modules gen 3.9 3.7 8.7 0.45
containers gen 28.4 28.6 48.9 0.58
varargs gen 5.6 5.4 8.4 0.67
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 0 12 0.000
escape gen 0 8 12 0.000
fib_iter gen 0 4 12 0.000
fib_recursive gen 0 0 12 0.000
files gen 0 4 8 0.000
gc_stack_roots gen 0 0 4 0.000
loops gen 0 0 16 0.000
modules gen 0 0 8 0.000
containers gen 4 11 28 0.147
control_flow gen 4 0 12 0.333
length gen 4 4 12 0.334
cartesian gen 4 0 8 0.495
scoped_resource gen 4 8 8 0.495
cgi gen 4 4 8 0.499
varargs gen 31 39 56 0.553
tuple_return_value gen 4 0 4 0.959
parse gen 8 0 4 1.902
asdl_generated gen 4 4 0 inf
pea_hello gen NA NA 11 NA

raw benchmark files