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 8 889 0.009
modules gen 2 2 177 0.012
fib_recursive gen 11 7 903 0.012
loops gen 4 3 295 0.012
asdl_generated gen 11 11 375 0.029
parse gen 25 23 758 0.033
scoped_resource gen 40 42 1,069 0.037
containers gen 10 10 123 0.084
files gen 7 4 78 0.094
tuple_return_value gen 20 15 185 0.111
classes gen 3 3 27 0.121
length gen 41 44 204 0.200
cartesian gen 92 79 327 0.282
escape gen 101 96 348 0.290
gc_stack_roots gen 2 2 4 0.438
cgi gen 265 268 511 0.519
varargs gen 8 20 12 0.685
control_flow gen 206 163 107 1.931

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.3 10.9 0.41
cartesian gen 3.5 3.5 7.1 0.50
parse gen 3.8 3.8 7.6 0.50
gc_stack_roots gen 3.5 3.4 6.9 0.51
asdl_generated gen 3.7 3.7 7.1 0.52
fib_recursive gen 3.7 3.8 7.1 0.52
tuple_return_value gen 3.7 3.8 7.1 0.52
fib_iter gen 3.5 3.8 6.8 0.52
escape gen 3.7 3.5 6.9 0.53
modules gen 3.7 3.9 6.9 0.53
length gen 3.8 3.8 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
scoped_resource gen 3.8 3.5 7.1 0.54
control_flow gen 3.8 3.8 6.9 0.55
files gen 3.8 3.7 6.9 0.55
cgi gen 3.7 3.7 6.7 0.55
containers gen 28.7 28.7 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
asdl_generated gen 0 0 8 0.000
cartesian gen 0 8 12 0.000
classes gen 0 0 4 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 4 8 0.000
gc_stack_roots gen 0 0 8 0.000
modules gen 0 0 8 0.000
tuple_return_value gen 0 4 8 0.000
parse gen 4 4 12 0.345
containers gen 5 5 12 0.432
control_flow gen 4 0 8 0.483
varargs gen 57 47 60 0.959
escape gen 4 8 4 0.972
cgi gen 4 0 4 0.991
length gen 4 0 4 1.020
scoped_resource gen 8 4 0 inf
files gen 0 4 0 NA
loops gen 0 0 0 NA

raw benchmark files