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 3 38 0.000
containers gen 0 0 125 0.000
modules gen 0 0 188 0.000
fib_iter gen 4 7 894 0.004
fib_recursive gen 11 7 884 0.012
loops gen 4 0 294 0.013
asdl_generated gen 7 11 376 0.019
parse gen 22 27 770 0.028
scoped_resource gen 44 38 1,028 0.042
tuple_return_value gen 15 15 185 0.083
files gen 7 7 79 0.093
gc_stack_roots gen 2 2 12 0.147
length gen 32 41 212 0.151
cartesian gen 82 79 330 0.248
escape gen 104 96 349 0.299
cgi gen 268 266 529 0.507
varargs gen 23 23 24 0.963
control_flow gen 207 157 113 1.831
pea_hello gen NA NA 9 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.3 0.36
parse gen 3.7 3.8 9.0 0.41
cartesian gen 3.5 3.7 8.4 0.42
gc_stack_roots gen 3.5 3.5 8.4 0.42
asdl_generated gen 3.7 3.7 8.5 0.43
fib_iter gen 3.7 3.8 8.5 0.43
cgi gen 3.7 3.7 8.4 0.44
escape gen 3.7 3.7 8.4 0.44
scoped_resource gen 3.7 3.8 8.4 0.44
fib_recursive gen 3.8 3.8 8.5 0.45
files gen 3.8 3.8 8.5 0.45
length gen 3.8 3.8 8.5 0.45
modules gen 3.8 3.9 8.5 0.45
control_flow gen 3.8 3.9 8.4 0.45
loops gen 3.8 3.7 8.4 0.45
tuple_return_value gen 3.8 3.8 8.4 0.45
containers gen 28.7 28.7 49.2 0.58
varargs gen 5.5 5.5 8.5 0.65
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 4 4 0.000
escape gen 0 8 8 0.000
fib_recursive gen 0 4 8 0.000
files gen 0 0 4 0.000
gc_stack_roots gen 0 0 8 0.000
loops gen 0 3 12 0.000
modules gen 2 2 8 0.219
asdl_generated gen 4 0 12 0.301
fib_iter gen 4 0 12 0.316
tuple_return_value gen 4 4 12 0.318
parse gen 9 0 20 0.434
scoped_resource gen 4 8 8 0.496
control_flow gen 4 4 8 0.511
varargs gen 42 42 56 0.757
containers gen 15 14 16 0.937
cartesian gen 8 8 8 1.018
length gen 12 4 4 3.009
classes gen 3 0 0 inf
pea_hello gen NA NA 9 NA

raw benchmark files