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
containers gen 0 7 115 0.000
loops gen 0 3 295 0.000
modules gen 0 2 189 0.000
fib_iter gen 7 8 937 0.008
fib_recursive gen 11 7 882 0.012
asdl_generated gen 11 11 392 0.027
parse gen 30 27 770 0.039
scoped_resource gen 43 42 1,029 0.042
files gen 7 7 76 0.096
tuple_return_value gen 19 11 190 0.101
classes gen 3 3 30 0.107
gc_stack_roots gen 2 2 15 0.111
length gen 45 46 211 0.213
cartesian gen 79 86 334 0.237
escape gen 92 98 351 0.263
cgi gen 265 268 525 0.504
varargs gen 19 27 28 0.691
control_flow gen 200 153 115 1.736
pea_hello gen NA NA 18 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.5 12.5 0.36
parse gen 3.7 3.9 9.1 0.40
gc_stack_roots gen 3.5 3.4 8.5 0.42
escape gen 3.5 3.7 8.4 0.42
fib_iter gen 3.5 3.7 8.4 0.42
cartesian gen 3.7 3.7 8.5 0.43
length gen 3.7 3.8 8.4 0.44
asdl_generated gen 3.7 3.7 8.3 0.44
cgi gen 3.7 3.5 8.3 0.44
control_flow gen 3.8 3.9 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
modules gen 3.8 3.7 8.5 0.45
tuple_return_value gen 3.8 3.8 8.5 0.45
fib_recursive gen 3.8 3.7 8.4 0.45
files gen 3.8 3.8 8.4 0.45
scoped_resource gen 3.8 3.5 8.4 0.45
containers gen 28.5 28.7 49.1 0.58
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
classes gen 0 0 8 0.000
fib_iter gen 0 0 8 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
length gen 0 0 4 0.000
parse gen 0 0 16 0.000
tuple_return_value gen 0 7 8 0.000
modules gen 2 0 8 0.223
loops gen 4 0 12 0.302
scoped_resource gen 4 4 12 0.329
cgi gen 4 0 8 0.492
containers gen 15 7 28 0.541
varargs gen 46 38 52 0.892
control_flow gen 8 8 4 2.014
cartesian gen 12 0 4 2.948
escape gen 12 4 4 3.020
asdl_generated gen 0 0 0 NA
pea_hello gen NA NA 0 NA

raw benchmark files