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 19 0.000
fib_iter gen 8 8 936 0.008
modules gen 2 2 192 0.009
loops gen 4 3 304 0.012
fib_recursive gen 11 11 883 0.012
asdl_generated gen 11 11 381 0.028
parse gen 27 28 760 0.035
scoped_resource gen 47 46 1,021 0.046
files gen 4 8 73 0.050
tuple_return_value gen 19 18 188 0.102
containers gen 12 7 111 0.106
length gen 41 39 206 0.198
gc_stack_roots gen 2 2 8 0.226
cartesian gen 87 75 347 0.252
escape gen 94 100 366 0.256
cgi gen 269 267 522 0.515
varargs gen 20 19 28 0.696
control_flow gen 206 162 114 1.811
pea_hello gen NA NA 7 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
cartesian gen 3.5 3.7 8.5 0.42
scoped_resource gen 3.5 3.8 8.5 0.42
gc_stack_roots gen 3.5 3.4 8.4 0.42
parse gen 3.8 3.8 9.0 0.42
control_flow gen 3.7 3.8 8.5 0.43
escape gen 3.7 3.7 8.5 0.43
asdl_generated gen 3.7 3.5 8.4 0.44
cgi gen 3.7 3.5 8.4 0.44
loops gen 3.8 3.8 8.5 0.45
modules gen 3.8 3.7 8.5 0.45
fib_iter gen 3.8 3.8 8.4 0.45
fib_recursive gen 3.8 3.7 8.4 0.45
files gen 3.8 3.8 8.4 0.45
length gen 3.8 3.8 8.4 0.45
tuple_return_value gen 3.8 3.7 8.4 0.45
containers gen 28.5 28.4 49.2 0.58
varargs gen 5.5 5.5 8.5 0.65
pea_hello gen NA NA 8.0 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 8 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 0 4 0.000
gc_stack_roots gen 0 0 12 0.000
loops gen 0 0 4 0.000
modules gen 0 0 4 0.000
scoped_resource gen 0 0 8 0.000
tuple_return_value gen 0 0 12 0.000
containers gen 4 7 32 0.124
classes gen 3 0 19 0.170
parse gen 4 0 12 0.317
files gen 4 0 12 0.317
length gen 4 8 12 0.337
cartesian gen 4 12 8 0.498
varargs gen 47 47 52 0.900
escape gen 12 4 0 inf
cgi gen 0 0 0 NA
pea_hello gen NA NA 11 NA

raw benchmark files