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
modules gen 0 2 173 0.000
fib_recursive gen 7 11 884 0.008
fib_iter gen 7 8 882 0.008
loops gen 4 0 285 0.013
asdl_generated gen 7 7 373 0.019
parse gen 26 23 770 0.034
containers gen 4 0 93 0.041
scoped_resource gen 44 46 1,044 0.042
tuple_return_value gen 20 15 190 0.107
files gen 7 4 67 0.110
cartesian gen 65 81 321 0.204
classes gen 3 3 15 0.208
length gen 44 37 197 0.223
escape gen 100 109 345 0.291
gc_stack_roots gen 2 2 4 0.428
cgi gen 267 262 511 0.522
varargs gen 12 16 20 0.587
control_flow gen 204 158 110 1.853

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
escape gen 3.5 3.7 6.9 0.51
asdl_generated gen 3.7 3.5 7.1 0.52
scoped_resource gen 3.7 3.7 7.1 0.52
gc_stack_roots gen 3.5 3.5 6.8 0.52
cartesian gen 3.7 3.5 6.9 0.53
cgi gen 3.7 3.8 6.9 0.53
fib_recursive gen 3.7 3.8 6.9 0.53
files gen 3.8 3.7 7.1 0.54
length gen 3.8 3.7 7.1 0.54
modules gen 3.8 3.8 6.9 0.55
tuple_return_value gen 3.8 3.7 6.9 0.55
control_flow gen 3.9 3.9 7.1 0.56
fib_iter gen 3.9 3.8 7.1 0.56
loops gen 3.9 3.8 6.9 0.57
containers gen 28.7 28.5 47.5 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
classes gen 0 0 15 0.000
fib_iter gen 0 0 12 0.000
files gen 0 4 8 0.000
gc_stack_roots gen 0 0 8 0.000
length gen 0 8 8 0.000
loops gen 0 3 8 0.000
tuple_return_value gen 0 4 4 0.000
modules gen 2 0 8 0.222
containers gen 11 14 40 0.280
fib_recursive gen 4 0 8 0.446
asdl_generated gen 4 4 8 0.452
escape gen 4 0 8 0.500
parse gen 4 4 4 0.920
control_flow gen 4 4 4 0.981
cgi gen 4 8 4 0.990
varargs gen 54 51 52 1.054
cartesian gen 25 4 8 3.061
scoped_resource gen 4 0 0 inf

raw benchmark files