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 8 911 0.008
modules gen 2 2 193 0.010
fib_recursive gen 11 11 886 0.012
loops gen 4 3 296 0.014
asdl_generated gen 7 14 381 0.019
scoped_resource gen 36 42 1,037 0.034
parse gen 30 23 786 0.038
files gen 4 7 79 0.051
containers gen 8 14 115 0.068
tuple_return_value gen 15 18 198 0.078
classes gen 3 3 26 0.125
length gen 40 46 207 0.193
cartesian gen 84 86 350 0.240
escape gen 102 105 355 0.287
gc_stack_roots gen 2 0 5 0.356
cgi gen 270 267 523 0.517
varargs gen 19 23 28 0.688
control_flow gen 204 159 113 1.807
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.3 12.5 0.36
asdl_generated gen 3.5 3.7 8.5 0.42
gc_stack_roots gen 3.5 3.4 8.5 0.42
cartesian gen 3.5 3.7 8.4 0.42
parse gen 3.8 3.9 9.0 0.42
cgi gen 3.7 3.7 8.5 0.43
escape gen 3.7 3.5 8.5 0.43
fib_iter gen 3.7 3.8 8.5 0.43
scoped_resource gen 3.7 3.7 8.5 0.43
modules gen 3.7 3.8 8.4 0.44
control_flow gen 3.8 3.9 8.5 0.45
length gen 3.8 3.8 8.5 0.45
loops gen 3.8 3.7 8.5 0.45
files gen 3.8 3.7 8.4 0.45
tuple_return_value gen 3.8 3.8 8.4 0.45
fib_recursive gen 3.9 3.8 8.4 0.47
containers gen 28.7 28.6 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
cgi gen 0 0 4 0.000
classes gen 0 0 13 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 0 8 0.000
gc_stack_roots gen 0 2 15 0.000
loops gen 0 0 8 0.000
modules gen 0 0 12 0.000
containers gen 8 0 32 0.247
asdl_generated gen 4 0 8 0.463
control_flow gen 4 4 8 0.496
length gen 4 0 8 0.503
escape gen 4 0 8 0.511
varargs gen 46 42 52 0.889
tuple_return_value gen 4 0 4 0.950
scoped_resource gen 12 4 12 0.993
cartesian gen 8 0 8 1.005
files gen 4 0 4 1.028
parse gen 0 4 0 NA
pea_hello gen NA NA 9 NA

raw benchmark files