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
gc_stack_roots gen 0 0 8 0.000
modules gen 0 2 181 0.000
fib_iter gen 8 8 880 0.009
fib_recursive gen 11 11 884 0.012
loops gen 4 3 293 0.014
asdl_generated gen 7 11 376 0.019
parse gen 25 27 810 0.031
scoped_resource gen 47 46 1,061 0.045
tuple_return_value gen 16 18 189 0.086
classes gen 3 0 34 0.094
files gen 7 8 76 0.099
containers gen 16 0 129 0.120
length gen 36 37 202 0.180
cartesian gen 88 71 333 0.263
escape gen 97 102 346 0.280
cgi gen 249 244 545 0.458
varargs gen 17 16 24 0.688
control_flow gen 210 159 110 1.917

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.5 8.5 0.42
gc_stack_roots gen 3.5 3.5 8.5 0.42
escape gen 3.5 3.7 8.4 0.42
parse gen 3.9 3.8 9.0 0.43
cartesian gen 3.7 3.7 8.4 0.44
cgi gen 3.7 3.7 8.4 0.44
fib_iter gen 3.7 3.7 8.4 0.44
length gen 3.8 3.9 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
modules gen 3.8 3.9 8.5 0.45
scoped_resource gen 3.8 3.8 8.5 0.45
control_flow gen 3.8 3.9 8.4 0.45
fib_recursive gen 3.8 3.8 8.4 0.45
files gen 3.8 3.8 8.4 0.45
tuple_return_value gen 3.8 3.7 8.3 0.46
containers gen 28.3 28.5 49.1 0.58
varargs gen 5.5 5.5 8.5 0.65

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 3 4 0.000
containers gen 0 14 12 0.000
control_flow gen 0 0 12 0.000
fib_iter gen 0 0 12 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 0 8 0.000
loops gen 0 0 12 0.000
scoped_resource gen 0 0 12 0.000
modules gen 2 0 12 0.150
gc_stack_roots gen 2 2 12 0.153
asdl_generated gen 4 0 12 0.297
cartesian gen 4 16 8 0.503
escape gen 8 4 16 0.507
length gen 8 8 16 0.510
tuple_return_value gen 4 0 8 0.518
varargs gen 50 49 56 0.885
parse gen 4 0 4 0.906
cgi gen 4 24 4 0.988

raw benchmark files