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 902 0.009
modules gen 2 2 179 0.010
fib_recursive gen 11 7 877 0.012
loops gen 4 3 312 0.013
asdl_generated gen 7 11 376 0.020
containers gen 4 10 117 0.035
parse gen 29 27 776 0.038
scoped_resource gen 44 83 1,045 0.042
files gen 4 4 69 0.056
tuple_return_value gen 20 15 184 0.110
classes gen 3 3 22 0.150
length gen 41 41 204 0.201
cartesian gen 91 77 327 0.277
escape gen 103 97 349 0.295
gc_stack_roots gen 2 0 4 0.458
cgi gen 269 268 522 0.516
varargs gen 12 12 20 0.591
control_flow gen 210 159 112 1.872

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.41
parse gen 3.7 3.8 7.6 0.48
gc_stack_roots gen 3.5 3.4 7.1 0.50
modules gen 3.5 3.8 7.1 0.50
cartesian gen 3.5 3.5 6.9 0.51
escape gen 3.5 3.7 6.9 0.51
files gen 3.7 3.8 7.1 0.52
asdl_generated gen 3.7 3.7 6.9 0.53
cgi gen 3.7 3.5 6.9 0.53
tuple_return_value gen 3.7 3.7 6.9 0.53
loops gen 3.8 3.5 7.1 0.54
scoped_resource gen 3.8 3.7 7.1 0.54
control_flow gen 3.8 3.9 6.9 0.55
fib_recursive gen 3.8 3.5 6.9 0.55
length gen 3.8 3.5 6.9 0.55
fib_iter gen 3.9 3.8 7.1 0.56
containers gen 28.6 28.6 47.8 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
cartesian gen 0 8 4 0.000
cgi gen 0 0 4 0.000
classes gen 0 0 9 0.000
control_flow gen 0 4 4 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 4 8 0.000
gc_stack_roots gen 0 2 8 0.000
loops gen 0 0 8 0.000
modules gen 0 0 4 0.000
parse gen 0 0 8 0.000
tuple_return_value gen 0 4 8 0.000
scoped_resource gen 4 0 8 0.499
files gen 4 4 8 0.508
containers gen 12 5 20 0.605
asdl_generated gen 4 0 4 0.917
length gen 4 4 4 0.933
escape gen 4 12 4 0.987
varargs gen 55 55 52 1.060

raw benchmark files