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 895 0.008
modules gen 2 0 211 0.009
fib_recursive gen 11 11 887 0.012
loops gen 4 3 303 0.014
asdl_generated gen 7 12 375 0.020
parse gen 31 19 779 0.039
scoped_resource gen 48 38 1,048 0.046
containers gen 8 4 130 0.062
tuple_return_value gen 16 11 192 0.081
files gen 8 8 76 0.099
classes gen 3 0 31 0.106
length gen 38 39 216 0.174
cartesian gen 87 70 334 0.261
escape gen 97 85 366 0.265
gc_stack_roots gen 2 0 4 0.464
cgi gen 266 266 520 0.512
varargs gen 23 12 24 0.962
control_flow gen 203 162 121 1.670
pea_hello gen NA NA 5 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.4 8.5 0.42
cartesian gen 3.5 3.5 8.4 0.42
escape gen 3.7 3.5 8.5 0.43
files gen 3.7 3.8 8.5 0.43
loops gen 3.7 3.8 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
scoped_resource gen 3.7 3.8 8.4 0.44
parse gen 3.9 3.8 9.0 0.44
modules gen 3.8 3.5 8.5 0.45
tuple_return_value gen 3.8 3.8 8.5 0.45
control_flow gen 3.8 3.7 8.4 0.45
fib_iter gen 3.8 3.9 8.4 0.45
fib_recursive gen 3.8 3.8 8.4 0.45
length gen 3.9 3.8 8.3 0.48
containers gen 28.5 28.7 49.2 0.58
varargs gen 5.5 5.5 8.5 0.65
pea_hello gen NA NA 7.9 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 3 8 0.000
fib_iter gen 0 0 16 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 0 8 0.000
gc_stack_roots gen 0 2 16 0.000
loops gen 0 0 4 0.000
modules gen 0 2 8 0.000
parse gen 0 8 12 0.000
scoped_resource gen 0 8 12 0.000
asdl_generated gen 4 0 16 0.232
cgi gen 4 4 12 0.332
tuple_return_value gen 4 7 8 0.487
containers gen 8 11 16 0.498
cartesian gen 4 16 8 0.498
varargs gen 43 54 56 0.756
escape gen 8 16 8 1.005
control_flow gen 4 0 4 1.015
length gen 8 8 4 1.883
pea_hello gen NA NA 14 NA

raw benchmark files