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
classes gen 0 0 19 0.000
fib_iter gen 8 4 900 0.008
modules gen 2 0 175 0.010
fib_recursive gen 11 11 884 0.013
loops gen 4 0 328 0.013
asdl_generated gen 7 11 376 0.019
containers gen 4 4 114 0.035
parse gen 29 23 768 0.038
scoped_resource gen 43 38 1,028 0.042
files gen 4 8 65 0.060
tuple_return_value gen 21 15 188 0.109
length gen 41 44 205 0.202
cartesian gen 88 84 339 0.259
escape gen 108 99 361 0.298
cgi gen 250 249 522 0.480
gc_stack_roots gen 2 2 4 0.488
varargs gen 23 8 16 1.452
control_flow gen 207 162 107 1.942

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.9 0.41
gc_stack_roots gen 3.5 3.5 7.1 0.50
parse gen 3.8 3.8 7.6 0.50
escape gen 3.5 3.7 6.9 0.51
modules gen 3.7 3.8 7.1 0.52
scoped_resource gen 3.7 3.7 7.1 0.52
cgi gen 3.7 3.7 6.9 0.53
fib_iter gen 3.7 3.8 6.9 0.53
tuple_return_value gen 3.7 3.8 6.9 0.53
files gen 3.8 3.7 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
cartesian gen 3.7 3.5 6.8 0.54
control_flow gen 3.8 3.8 6.9 0.55
fib_recursive gen 3.8 3.7 6.9 0.55
asdl_generated gen 3.8 3.5 6.8 0.56
length gen 3.9 3.8 6.8 0.58
containers gen 28.3 28.6 47.5 0.60
varargs gen 5.6 5.5 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
control_flow gen 0 0 8 0.000
escape gen 0 4 4 0.000
fib_iter gen 0 4 12 0.000
gc_stack_roots gen 0 0 8 0.000
loops gen 0 3 4 0.000
modules gen 0 2 8 0.000
parse gen 0 4 8 0.000
tuple_return_value gen 0 4 4 0.000
classes gen 3 3 12 0.279
scoped_resource gen 4 8 12 0.329
files gen 4 0 11 0.339
containers gen 12 11 24 0.495
cartesian gen 4 4 8 0.501
varargs gen 43 58 57 0.761
asdl_generated gen 4 0 4 0.908
cgi gen 4 4 4 0.997
length gen 4 0 4 1.032
fib_recursive gen 0 0 0 NA

raw benchmark files