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
gc_stack_roots gen 0 0 12 0.000
modules gen 0 0 174 0.000
fib_iter gen 8 8 888 0.009
fib_recursive gen 11 7 885 0.012
loops gen 4 3 294 0.013
asdl_generated gen 7 7 376 0.020
parse gen 21 27 762 0.027
scoped_resource gen 39 46 1,094 0.036
tuple_return_value gen 14 9 181 0.076
containers gen 11 7 117 0.090
classes gen 3 3 31 0.106
files gen 7 7 69 0.107
length gen 36 40 202 0.179
cartesian gen 79 87 321 0.247
escape gen 100 94 347 0.288
cgi gen 255 275 517 0.494
varargs gen 12 0 16 0.769
control_flow gen 211 160 109 1.940

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.7 0.41
asdl_generated gen 3.5 3.7 6.9 0.51
cartesian gen 3.5 3.5 6.9 0.51
cgi gen 3.5 3.7 6.9 0.51
gc_stack_roots gen 3.5 3.4 6.9 0.51
parse gen 3.9 3.9 7.6 0.52
loops gen 3.7 3.8 7.1 0.52
fib_recursive gen 3.5 3.7 6.8 0.52
escape gen 3.7 3.7 6.9 0.53
files gen 3.7 3.8 6.9 0.53
modules gen 3.7 3.7 6.9 0.53
length gen 3.8 3.8 6.9 0.55
scoped_resource gen 3.8 3.7 6.9 0.55
tuple_return_value gen 3.8 3.7 6.9 0.55
control_flow gen 3.9 3.8 6.9 0.57
fib_iter gen 3.9 3.7 6.9 0.57
containers gen 28.5 28.6 47.6 0.60
varargs gen 5.6 5.6 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 0 4 0.000
control_flow gen 0 0 4 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 4 12 0.000
files gen 0 0 8 0.000
loops gen 0 0 8 0.000
modules gen 2 2 8 0.221
containers gen 5 7 20 0.261
escape gen 4 8 8 0.502
tuple_return_value gen 7 9 12 0.568
asdl_generated gen 4 4 4 0.917
varargs gen 53 66 56 0.952
cartesian gen 12 0 12 0.999
length gen 8 4 8 1.012
parse gen 8 0 8 1.040
scoped_resource gen 8 0 4 1.965
gc_stack_roots gen 2 2 0 inf
classes gen 0 0 0 NA

raw benchmark files