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
classes gen 0 3 23 0.000
modules gen 0 2 178 0.000
fib_iter gen 8 8 911 0.008
fib_recursive gen 11 11 874 0.012
loops gen 4 3 288 0.013
asdl_generated gen 11 11 375 0.028
containers gen 4 0 104 0.036
parse gen 29 27 768 0.038
scoped_resource gen 44 47 1,031 0.042
tuple_return_value gen 16 18 193 0.084
files gen 8 7 71 0.107
length gen 37 44 202 0.182
cartesian gen 79 88 331 0.237
escape gen 101 95 341 0.295
gc_stack_roots gen 2 2 4 0.436
cgi gen 255 257 503 0.507
varargs gen 21 16 16 1.294
control_flow gen 207 159 104 1.998

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.5 10.9 0.41
cartesian gen 3.4 3.7 7.1 0.48
asdl_generated gen 3.5 3.7 6.9 0.51
parse gen 3.9 3.7 7.6 0.52
fib_iter gen 3.7 3.8 7.1 0.52
length gen 3.7 3.8 7.1 0.52
modules gen 3.7 3.8 7.1 0.52
scoped_resource gen 3.7 3.5 7.1 0.52
gc_stack_roots gen 3.5 3.4 6.8 0.52
control_flow gen 3.7 3.9 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
files gen 3.7 3.9 6.9 0.53
cgi gen 3.7 3.7 6.8 0.54
fib_recursive gen 3.8 3.7 6.9 0.55
loops gen 3.8 3.7 6.9 0.55
tuple_return_value gen 3.8 3.8 6.9 0.55
containers gen 28.7 28.6 47.6 0.60
varargs gen 5.5 5.5 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
cgi gen 0 12 12 0.000
control_flow gen 0 0 12 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 0 4 0.000
gc_stack_roots gen 0 0 8 0.000
loops gen 0 0 8 0.000
parse gen 0 0 8 0.000
escape gen 4 8 12 0.339
containers gen 11 14 32 0.352
classes gen 3 0 8 0.414
modules gen 2 0 4 0.451
tuple_return_value gen 4 0 8 0.517
varargs gen 45 51 56 0.814
length gen 7 0 8 0.928
scoped_resource gen 4 0 4 0.994
cartesian gen 12 0 0 inf
fib_iter gen 0 0 0 NA

raw benchmark files