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 0 125 0.000
gc_stack_roots gen 0 0 11 0.000
fib_recursive gen 7 11 952 0.008
fib_iter gen 8 8 932 0.008
modules gen 2 0 186 0.009
loops gen 4 3 292 0.014
asdl_generated gen 5 11 377 0.014
parse gen 27 27 832 0.032
scoped_resource gen 48 42 1,022 0.047
tuple_return_value gen 16 14 193 0.081
files gen 7 7 82 0.089
classes gen 3 3 27 0.130
length gen 33 42 209 0.156
cartesian gen 88 75 335 0.263
escape gen 98 102 356 0.274
cgi gen 250 268 531 0.471
varargs gen 16 12 16 1.027
control_flow gen 207 162 109 1.891
pea_hello gen NA NA 11 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
cgi gen 3.5 3.7 8.5 0.42
gc_stack_roots gen 3.5 3.5 8.4 0.42
loops gen 3.5 3.8 8.4 0.42
parse gen 3.8 3.8 9.0 0.42
asdl_generated gen 3.7 3.7 8.5 0.43
cartesian gen 3.7 3.5 8.5 0.43
files gen 3.8 3.8 8.5 0.45
modules gen 3.8 3.8 8.5 0.45
scoped_resource gen 3.8 3.8 8.5 0.45
tuple_return_value gen 3.8 3.7 8.5 0.45
escape gen 3.8 3.7 8.4 0.45
fib_iter gen 3.8 3.8 8.4 0.45
fib_recursive gen 3.8 3.8 8.4 0.45
length gen 3.8 3.7 8.4 0.45
control_flow gen 3.8 3.9 8.3 0.46
containers gen 28.7 28.4 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
classes gen 0 0 11 0.000
control_flow gen 0 0 12 0.000
fib_iter gen 0 0 8 0.000
files gen 0 0 4 0.000
loops gen 0 0 12 0.000
modules gen 0 2 8 0.000
scoped_resource gen 0 4 20 0.000
gc_stack_roots gen 2 2 8 0.229
parse gen 4 0 12 0.318
asdl_generated gen 5 0 12 0.444
tuple_return_value gen 4 5 8 0.485
cgi gen 4 0 8 0.497
varargs gen 49 54 64 0.770
containers gen 15 14 16 0.950
cartesian gen 4 12 4 0.991
escape gen 8 0 8 1.017
length gen 12 4 8 1.550
fib_recursive gen 4 0 0 inf
pea_hello gen NA NA 7 NA

raw benchmark files