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 24 0.000
fib_recursive gen 7 11 891 0.008
fib_iter gen 8 8 894 0.009
modules gen 2 0 173 0.011
loops gen 4 0 298 0.015
asdl_generated gen 7 8 372 0.020
containers gen 4 12 112 0.036
parse gen 30 24 788 0.038
scoped_resource gen 44 46 1,032 0.043
tuple_return_value gen 21 19 199 0.107
files gen 7 8 69 0.108
length gen 34 42 204 0.166
cartesian gen 88 88 326 0.271
varargs gen 8 12 28 0.296
escape gen 105 88 348 0.302
cgi gen 270 265 523 0.516
control_flow gen 211 157 105 2.001
gc_stack_roots gen 2 0 0 inf

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.7 0.41
parse gen 3.8 3.8 7.6 0.50
gc_stack_roots gen 3.5 3.5 6.9 0.51
cartesian gen 3.7 3.7 7.1 0.52
files gen 3.7 3.8 7.1 0.52
scoped_resource gen 3.7 3.8 7.1 0.52
escape gen 3.7 3.5 6.9 0.53
fib_iter gen 3.8 3.8 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
modules gen 3.8 3.7 7.1 0.54
asdl_generated gen 3.8 3.8 6.9 0.55
cgi gen 3.8 3.7 6.9 0.55
control_flow gen 3.8 3.8 6.9 0.55
fib_recursive gen 3.8 3.8 6.9 0.55
length gen 3.8 3.8 6.9 0.55
tuple_return_value gen 3.8 3.7 6.8 0.56
containers gen 28.6 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
control_flow gen 0 4 12 0.000
escape gen 0 16 8 0.000
fib_iter gen 0 0 4 0.000
files gen 0 0 12 0.000
gc_stack_roots gen 0 2 12 0.000
loops gen 0 3 4 0.000
modules gen 0 2 12 0.000
parse gen 0 4 12 0.000
tuple_return_value gen 0 0 8 0.000
asdl_generated gen 4 4 12 0.307
scoped_resource gen 4 0 12 0.334
cartesian gen 4 0 12 0.337
fib_recursive gen 4 0 9 0.404
containers gen 12 4 28 0.436
classes gen 4 0 8 0.447
varargs gen 58 55 44 1.319
length gen 11 4 8 1.442
cgi gen 0 4 0 NA

raw benchmark files