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
containers gen 0 7 122 0.000
fib_iter gen 8 8 893 0.009
modules gen 2 2 166 0.011
fib_recursive gen 11 11 881 0.013
loops gen 4 3 291 0.013
asdl_generated gen 7 11 375 0.019
parse gen 29 27 783 0.037
scoped_resource gen 48 46 1,102 0.043
tuple_return_value gen 21 18 188 0.110
files gen 7 8 63 0.116
classes gen 3 3 23 0.140
gc_stack_roots gen 2 2 12 0.146
length gen 44 44 208 0.213
cartesian gen 81 83 344 0.235
escape gen 106 103 354 0.299
cgi gen 252 264 543 0.463
varargs gen 12 20 11 1.032
control_flow gen 208 157 105 1.987

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
gc_stack_roots gen 3.4 3.5 6.9 0.49
parse gen 3.8 3.9 7.5 0.51
cartesian gen 3.5 3.5 6.9 0.51
scoped_resource gen 3.7 3.7 7.1 0.52
asdl_generated gen 3.7 3.7 6.9 0.53
cgi gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
fib_iter gen 3.7 3.7 6.9 0.53
fib_recursive gen 3.7 3.5 6.9 0.53
tuple_return_value gen 3.7 3.7 6.9 0.53
control_flow gen 3.8 3.8 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
files gen 3.8 3.8 6.9 0.55
length gen 3.8 3.8 6.9 0.55
modules gen 3.9 3.9 7.1 0.56
containers gen 28.5 28.4 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
classes gen 0 0 8 0.000
control_flow gen 0 4 8 0.000
escape gen 0 0 4 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 0 12 0.000
length gen 0 0 4 0.000
loops gen 0 0 8 0.000
modules gen 0 0 16 0.000
parse gen 0 0 8 0.000
scoped_resource gen 0 0 12 0.000
tuple_return_value gen 0 0 4 0.000
asdl_generated gen 4 0 8 0.453
varargs gen 55 47 61 0.903
containers gen 16 7 16 0.986
cgi gen 4 4 4 1.000
cartesian gen 12 4 4 2.886
gc_stack_roots gen 0 0 0 NA

raw benchmark files