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
loops gen 0 3 292 0.000
modules gen 0 0 174 0.000
fib_iter gen 8 8 893 0.008
fib_recursive gen 11 11 882 0.012
asdl_generated gen 11 11 374 0.029
parse gen 25 27 755 0.034
containers gen 4 7 110 0.035
scoped_resource gen 44 45 1,049 0.042
tuple_return_value gen 16 18 188 0.086
files gen 8 4 71 0.107
classes gen 3 0 19 0.167
length gen 41 41 195 0.209
gc_stack_roots gen 2 0 8 0.214
cartesian gen 92 79 346 0.267
escape gen 97 95 347 0.281
cgi gen 243 244 513 0.474
control_flow gen 209 162 110 1.892
varargs gen 24 12 4 6.214

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.3 4.5 10.7 0.40
asdl_generated gen 3.5 3.7 7.1 0.50
parse gen 3.8 3.8 7.6 0.50
cartesian gen 3.5 3.5 6.9 0.51
escape gen 3.5 3.7 6.9 0.51
cgi gen 3.7 3.5 7.1 0.52
fib_recursive gen 3.7 3.9 7.1 0.52
scoped_resource gen 3.7 3.8 7.1 0.52
gc_stack_roots gen 3.5 3.5 6.8 0.52
files gen 3.7 3.8 6.9 0.53
length gen 3.7 3.8 6.9 0.53
tuple_return_value gen 3.7 3.8 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
control_flow gen 3.8 3.8 6.9 0.55
fib_iter gen 3.8 3.8 6.9 0.55
modules gen 3.8 3.7 6.9 0.55
containers gen 28.6 28.5 47.6 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 4 0.000
classes gen 0 3 11 0.000
control_flow gen 0 0 4 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 4 4 0.000
gc_stack_roots gen 0 2 4 0.000
modules gen 2 2 8 0.215
length gen 4 4 16 0.256
parse gen 4 0 12 0.303
loops gen 4 0 8 0.457
containers gen 12 7 24 0.478
varargs gen 43 54 68 0.633
scoped_resource gen 4 0 4 1.007
tuple_return_value gen 4 0 4 1.012
cgi gen 12 8 8 1.493
escape gen 8 8 4 2.035
cartesian gen 0 8 0 NA

raw benchmark files