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 4 0.000
fib_iter gen 8 8 894 0.009
modules gen 2 2 170 0.012
fib_recursive gen 11 11 872 0.012
loops gen 4 3 294 0.013
asdl_generated gen 5 11 390 0.014
parse gen 26 19 778 0.033
scoped_resource gen 47 46 1,018 0.047
files gen 4 7 73 0.053
containers gen 8 4 110 0.072
tuple_return_value gen 21 18 186 0.113
classes gen 3 3 23 0.141
length gen 37 33 204 0.182
cartesian gen 78 82 330 0.237
escape gen 89 107 361 0.246
cgi gen 270 263 514 0.525
varargs gen 17 23 24 0.687
control_flow gen 209 162 108 1.931

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 10.6 0.42
parse gen 3.7 3.7 7.6 0.48
asdl_generated gen 3.5 3.7 7.1 0.50
loops gen 3.7 3.8 7.2 0.51
gc_stack_roots gen 3.5 3.4 6.9 0.51
cartesian gen 3.7 3.7 7.1 0.52
escape gen 3.7 3.5 7.1 0.52
fib_recursive gen 3.7 3.7 7.1 0.52
modules gen 3.7 3.7 7.1 0.52
scoped_resource gen 3.7 3.8 7.1 0.52
cgi gen 3.7 3.7 6.9 0.53
length gen 3.7 3.7 6.9 0.53
fib_iter gen 3.8 3.8 6.9 0.55
files gen 3.8 3.9 6.9 0.55
tuple_return_value gen 3.8 3.7 6.9 0.55
control_flow gen 3.8 3.7 6.8 0.56
containers gen 28.5 28.6 47.6 0.60
varargs gen 5.6 5.4 6.8 0.83

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 8 4 0.000
classes gen 0 0 8 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 12 0.000
loops gen 0 0 4 0.000
modules gen 0 0 12 0.000
scoped_resource gen 0 0 8 0.000
tuple_return_value gen 0 0 12 0.000
gc_stack_roots gen 2 0 8 0.229
containers gen 8 12 27 0.288
parse gen 4 8 12 0.305
asdl_generated gen 5 0 12 0.454
files gen 4 0 4 0.953
varargs gen 50 43 48 1.031
length gen 8 11 8 1.034
cartesian gen 16 4 4 3.880
escape gen 16 0 4 4.019

raw benchmark files