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 887 0.004
modules gen 2 2 176 0.010
fib_recursive gen 11 11 880 0.012
loops gen 4 0 291 0.012
asdl_generated gen 5 7 376 0.014
parse gen 25 23 773 0.032
scoped_resource gen 40 34 1,034 0.039
containers gen 8 7 120 0.065
files gen 7 4 72 0.103
tuple_return_value gen 20 14 187 0.108
classes gen 3 3 20 0.162
length gen 41 37 198 0.209
gc_stack_roots gen 2 0 8 0.223
cartesian gen 82 77 331 0.249
varargs gen 8 19 27 0.286
escape gen 102 110 354 0.289
cgi gen 249 267 506 0.492
control_flow gen 211 162 105 2.015

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.42
gc_stack_roots gen 3.4 3.7 7.1 0.48
parse gen 3.8 3.8 7.6 0.50
cgi gen 3.5 3.7 6.9 0.51
loops 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.7 7.1 0.52
asdl_generated gen 3.7 3.7 6.9 0.53
cartesian gen 3.7 3.8 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
fib_recursive gen 3.7 3.8 6.9 0.53
fib_iter gen 3.8 3.8 7.1 0.54
length gen 3.8 3.8 7.1 0.54
control_flow gen 3.8 3.7 6.9 0.55
files gen 3.8 3.8 6.9 0.55
tuple_return_value gen 3.9 3.8 7.1 0.56
containers gen 28.5 28.5 47.6 0.60
varargs gen 5.6 5.5 7.1 0.80

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 0 12 0.000
control_flow gen 0 0 8 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 4 4 0.000
gc_stack_roots gen 0 2 4 0.000
loops gen 0 3 4 0.000
modules gen 0 0 8 0.000
tuple_return_value gen 0 5 8 0.000
fib_iter gen 4 0 12 0.316
length gen 4 7 12 0.316
cgi gen 4 0 12 0.336
parse gen 4 4 12 0.347
containers gen 8 7 16 0.490
asdl_generated gen 5 4 8 0.671
cartesian gen 8 8 8 1.031
varargs gen 59 47 47 1.251
scoped_resource gen 8 11 4 1.990
escape gen 4 0 0 inf

raw benchmark files