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 2 8 0.000
fib_iter gen 4 8 902 0.004
modules gen 2 2 202 0.009
fib_recursive gen 11 7 898 0.012
loops gen 4 3 306 0.012
asdl_generated gen 11 11 374 0.029
containers gen 4 14 106 0.036
parse gen 30 19 786 0.038
scoped_resource gen 43 39 1,048 0.041
tuple_return_value gen 19 7 196 0.098
files gen 7 7 72 0.105
classes gen 3 3 26 0.123
length gen 41 39 206 0.198
cartesian gen 83 78 325 0.255
escape gen 103 87 355 0.289
cgi gen 269 267 532 0.506
varargs gen 20 28 16 1.278
control_flow gen 208 163 113 1.836
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.6 4.5 12.3 0.37
gc_stack_roots gen 3.4 3.4 8.5 0.40
modules gen 3.4 3.8 8.5 0.40
scoped_resource gen 3.5 3.7 8.5 0.42
escape gen 3.5 3.7 8.4 0.42
parse gen 3.8 3.9 9.0 0.42
tuple_return_value gen 3.7 3.8 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
cartesian gen 3.7 3.7 8.4 0.44
cgi gen 3.7 3.5 8.4 0.44
length gen 3.8 3.9 8.5 0.45
fib_recursive gen 3.8 3.8 8.4 0.45
files gen 3.8 3.7 8.4 0.45
loops gen 3.8 3.8 8.4 0.45
fib_iter gen 3.8 3.7 8.1 0.47
control_flow gen 3.9 3.8 8.4 0.47
containers gen 28.5 28.6 49.1 0.58
varargs gen 5.5 5.6 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 16 0.000
cgi gen 0 0 12 0.000
classes gen 0 0 13 0.000
control_flow gen 0 0 8 0.000
fib_recursive gen 0 4 4 0.000
files gen 0 0 12 0.000
loops gen 0 0 4 0.000
modules gen 0 0 4 0.000
parse gen 0 8 4 0.000
tuple_return_value gen 0 11 8 0.000
gc_stack_roots gen 2 0 12 0.146
length gen 4 8 12 0.306
containers gen 11 0 37 0.313
fib_iter gen 4 0 12 0.316
scoped_resource gen 4 8 8 0.488
cartesian gen 8 8 16 0.498
varargs gen 45 37 64 0.703
escape gen 4 16 4 0.988
pea_hello gen NA NA 7 NA

raw benchmark files