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 4 31 0.000
loops gen 0 0 295 0.000
fib_iter gen 8 4 902 0.008
modules gen 2 0 190 0.009
fib_recursive gen 11 7 890 0.012
asdl_generated gen 11 11 393 0.028
parse gen 30 27 779 0.039
scoped_resource gen 43 46 1,024 0.042
containers gen 8 7 107 0.073
tuple_return_value gen 15 15 188 0.082
files gen 7 7 77 0.094
gc_stack_roots gen 2 2 16 0.113
length gen 41 34 216 0.190
cartesian gen 84 78 328 0.255
escape gen 98 95 351 0.279
cgi gen 268 264 529 0.507
varargs gen 16 12 32 0.510
control_flow gen 208 163 124 1.686
pea_hello gen NA NA 15 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
parse gen 3.7 3.8 9.1 0.40
cartesian gen 3.7 3.8 8.5 0.43
cgi gen 3.7 3.7 8.5 0.43
modules gen 3.7 3.8 8.5 0.43
asdl_generated gen 3.7 3.5 8.4 0.44
gc_stack_roots gen 3.7 3.4 8.4 0.44
fib_iter gen 3.8 3.5 8.5 0.45
fib_recursive gen 3.8 3.5 8.5 0.45
loops gen 3.8 3.7 8.5 0.45
scoped_resource gen 3.8 3.5 8.5 0.45
tuple_return_value gen 3.8 3.8 8.5 0.45
control_flow gen 3.8 3.7 8.4 0.45
escape gen 3.8 3.7 8.4 0.45
length gen 3.8 3.8 8.4 0.45
files gen 3.9 3.9 8.3 0.48
containers gen 28.8 28.6 49.1 0.59
varargs gen 5.5 5.6 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 0 4 0.000
control_flow gen 0 0 4 0.000
fib_recursive gen 0 4 8 0.000
files gen 0 0 8 0.000
gc_stack_roots gen 0 0 4 0.000
modules gen 0 2 8 0.000
parse gen 0 0 8 0.000
containers gen 8 7 36 0.218
tuple_return_value gen 4 4 12 0.322
scoped_resource gen 4 0 12 0.329
classes gen 3 0 8 0.409
loops gen 4 3 8 0.483
cartesian gen 8 8 8 0.996
varargs gen 49 53 48 1.019
escape gen 8 8 8 1.025
length gen 4 11 4 1.028
cgi gen 0 4 0 NA
fib_iter gen 0 4 0 NA
pea_hello gen NA NA 4 NA

raw benchmark files