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
fib_iter gen 4 8 878 0.004
modules gen 2 2 176 0.012
fib_recursive gen 11 11 892 0.012
loops gen 4 3 291 0.015
asdl_generated gen 8 4 378 0.022
containers gen 4 10 131 0.031
parse gen 30 27 771 0.038
scoped_resource gen 47 38 1,078 0.044
tuple_return_value gen 21 11 186 0.113
files gen 12 8 70 0.167
classes gen 4 0 20 0.176
length gen 45 37 214 0.211
gc_stack_roots gen 2 2 8 0.236
cartesian gen 87 82 320 0.271
varargs gen 8 21 28 0.275
escape gen 99 109 348 0.286
cgi gen 267 265 513 0.520
control_flow gen 214 165 108 1.975

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.6 0.42
gc_stack_roots gen 3.5 3.4 6.9 0.51
parse gen 3.9 3.7 7.5 0.53
asdl_generated gen 3.7 3.5 6.9 0.53
cartesian gen 3.7 3.5 6.9 0.53
cgi gen 3.7 3.7 6.9 0.53
control_flow gen 3.7 3.9 6.9 0.53
escape gen 3.7 3.5 6.9 0.53
fib_iter gen 3.7 3.8 6.9 0.53
modules gen 3.7 3.8 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
scoped_resource gen 3.8 3.7 7.1 0.54
length gen 3.8 3.8 6.9 0.55
tuple_return_value gen 3.8 3.7 6.9 0.55
fib_recursive gen 3.8 3.8 6.8 0.56
files gen 3.8 3.8 6.8 0.56
containers gen 28.5 28.5 47.5 0.60
varargs gen 5.5 5.6 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 3 12 0.000
control_flow gen 0 0 8 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 0 8 0.000
gc_stack_roots gen 0 0 4 0.000
loops gen 0 0 8 0.000
modules gen 0 0 8 0.000
parse gen 0 0 8 0.000
scoped_resource gen 0 8 8 0.000
tuple_return_value gen 0 8 8 0.000
cartesian gen 4 4 16 0.249
fib_iter gen 4 0 12 0.324
cgi gen 4 4 8 0.501
asdl_generated gen 4 8 4 1.061
varargs gen 59 46 45 1.312
containers gen 12 5 8 1.478
escape gen 8 0 4 1.988
length gen 0 7 0 NA

raw benchmark files