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
modules gen 0 2 171 0.000
varargs gen 0 16 20 0.000
fib_iter gen 8 8 891 0.009
fib_recursive gen 11 11 890 0.012
loops gen 4 3 295 0.013
asdl_generated gen 7 11 375 0.019
parse gen 29 22 759 0.039
scoped_resource gen 48 38 1,056 0.045
tuple_return_value gen 12 18 188 0.065
containers gen 8 7 96 0.083
files gen 7 7 65 0.113
classes gen 3 3 19 0.167
length gen 41 37 196 0.210
cartesian gen 88 73 325 0.270
escape gen 117 100 352 0.332
gc_stack_roots gen 2 2 4 0.441
cgi gen 265 264 500 0.530
control_flow gen 210 162 109 1.915

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.8 0.41
parse gen 3.8 3.7 7.7 0.49
asdl_generated gen 3.5 3.7 6.9 0.51
gc_stack_roots gen 3.5 3.5 6.9 0.51
scoped_resource gen 3.5 3.8 6.9 0.51
cgi gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.5 6.9 0.53
files gen 3.8 3.8 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
fib_iter gen 3.7 3.8 6.8 0.54
cartesian gen 3.8 3.7 6.9 0.55
control_flow gen 3.8 3.9 6.9 0.55
length gen 3.8 3.8 6.9 0.55
modules gen 3.8 3.8 6.9 0.55
tuple_return_value gen 3.8 3.8 6.9 0.55
fib_recursive gen 3.8 3.8 6.8 0.56
containers gen 28.8 28.5 47.8 0.60
varargs gen 5.5 5.6 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 0 12 0.000
control_flow gen 0 0 4 0.000
escape gen 0 4 4 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 0 12 0.000
gc_stack_roots gen 0 0 8 0.000
loops gen 0 0 4 0.000
parse gen 0 4 8 0.000
modules gen 2 0 12 0.151
containers gen 8 7 40 0.198
length gen 4 8 12 0.312
cgi gen 4 4 12 0.330
asdl_generated gen 4 0 8 0.453
cartesian gen 4 16 8 0.498
varargs gen 67 50 52 1.272
tuple_return_value gen 8 0 4 2.051
scoped_resource gen 0 8 0 NA

raw benchmark files