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_recursive gen 7 7 900 0.008
fib_iter gen 8 4 892 0.008
modules gen 2 0 180 0.010
loops gen 4 3 297 0.013
asdl_generated gen 11 11 378 0.028
parse gen 29 27 790 0.037
scoped_resource gen 44 46 1,054 0.042
containers gen 12 10 116 0.101
files gen 7 8 72 0.102
tuple_return_value gen 20 11 177 0.116
length gen 32 41 204 0.158
classes gen 3 3 19 0.167
cartesian gen 82 80 325 0.253
escape gen 97 100 349 0.278
cgi gen 268 244 517 0.519
varargs gen 15 12 16 0.962
control_flow gen 206 155 108 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.6 10.8 0.41
cgi gen 3.5 3.5 7.1 0.50
escape gen 3.5 3.7 7.1 0.50
parse gen 3.8 3.8 7.6 0.50
scoped_resource gen 3.7 3.7 7.2 0.51
gc_stack_roots gen 3.5 3.4 6.9 0.51
control_flow gen 3.7 3.7 7.1 0.52
loops gen 3.7 3.8 7.1 0.52
asdl_generated gen 3.7 3.5 6.9 0.53
cartesian gen 3.7 3.7 6.9 0.53
fib_iter gen 3.7 3.5 6.9 0.53
modules gen 3.7 3.5 6.9 0.53
length gen 3.8 3.7 7.1 0.54
tuple_return_value gen 3.8 3.9 7.1 0.54
fib_recursive gen 3.8 3.7 6.9 0.55
files gen 3.8 3.7 6.8 0.56
containers gen 28.5 28.5 47.5 0.60
varargs gen 5.5 5.6 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 8 0.000
classes gen 0 0 11 0.000
control_flow gen 0 4 8 0.000
fib_iter gen 0 4 16 0.000
files gen 0 0 4 0.000
modules gen 0 2 4 0.000
parse gen 0 0 4 0.000
tuple_return_value gen 0 7 16 0.000
containers gen 4 5 24 0.163
fib_recursive gen 4 4 12 0.300
gc_stack_roots gen 2 0 4 0.467
varargs gen 50 54 56 0.893
scoped_resource gen 4 0 4 0.997
escape gen 8 4 4 2.012
cartesian gen 12 8 4 2.933
length gen 12 4 4 3.016
cgi gen 4 8 0 inf
loops gen 0 0 0 NA

raw benchmark files