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 8 7 886 0.008
modules gen 2 2 181 0.009
fib_recursive gen 11 11 900 0.012
loops gen 4 3 288 0.013
asdl_generated gen 11 11 379 0.028
parse gen 25 19 771 0.032
scoped_resource gen 44 41 1,033 0.043
files gen 7 7 72 0.102
tuple_return_value gen 21 15 187 0.110
containers gen 11 7 89 0.126
classes gen 3 3 23 0.139
length gen 44 41 207 0.213
escape gen 87 96 349 0.249
cartesian gen 88 82 323 0.273
gc_stack_roots gen 2 0 4 0.444
cgi gen 250 253 517 0.484
varargs gen 19 16 20 0.977
control_flow gen 211 162 105 2.008

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.6 4.5 10.8 0.43
gc_stack_roots gen 3.4 3.4 7.1 0.48
parse gen 3.8 3.9 7.6 0.50
asdl_generated gen 3.5 3.7 6.9 0.51
cartesian gen 3.5 3.5 6.9 0.51
length gen 3.7 3.8 7.1 0.52
cgi gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
tuple_return_value gen 3.7 3.5 6.9 0.53
scoped_resource gen 3.8 3.7 7.1 0.54
fib_iter gen 3.8 3.8 6.9 0.55
fib_recursive gen 3.8 3.9 6.9 0.55
files gen 3.8 3.8 6.9 0.55
loops gen 3.8 3.7 6.9 0.55
modules gen 3.8 3.8 6.9 0.55
control_flow gen 3.9 3.8 7.1 0.56
containers gen 28.7 28.7 47.6 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
asdl_generated gen 0 0 4 0.000
classes gen 0 0 8 0.000
control_flow gen 0 0 12 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 0 4 0.000
gc_stack_roots gen 0 2 8 0.000
loops gen 0 0 4 0.000
tuple_return_value gen 0 4 4 0.000
containers gen 4 7 44 0.084
scoped_resource gen 4 4 12 0.335
varargs gen 46 49 51 0.901
cgi gen 4 0 4 0.991
cartesian gen 4 4 4 0.993
parse gen 4 8 4 1.029
escape gen 16 8 8 1.994
length gen 0 4 0 NA
modules gen 0 0 0 NA

raw benchmark files