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 184 0.000
fib_iter gen 8 8 890 0.009
fib_recursive gen 11 7 884 0.012
loops gen 4 0 308 0.013
asdl_generated gen 7 11 382 0.019
containers gen 3 0 114 0.029
parse gen 28 28 770 0.037
scoped_resource gen 43 38 1,031 0.042
files gen 8 8 85 0.088
tuple_return_value gen 21 15 199 0.103
classes gen 3 3 29 0.115
length gen 45 37 208 0.217
gc_stack_roots gen 2 2 8 0.218
cartesian gen 91 74 336 0.272
escape gen 101 93 364 0.278
cgi gen 250 263 518 0.483
varargs gen 20 17 28 0.690
control_flow gen 207 163 115 1.798

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 12.3 0.36
gc_stack_roots gen 3.4 3.7 8.4 0.41
parse gen 3.7 3.8 8.8 0.42
asdl_generated gen 3.5 3.7 8.4 0.42
cartesian gen 3.5 3.5 8.4 0.42
escape gen 3.7 3.5 8.5 0.43
cgi gen 3.7 3.7 8.4 0.44
scoped_resource gen 3.7 3.8 8.4 0.44
modules gen 3.8 3.8 8.7 0.44
control_flow gen 3.8 3.8 8.5 0.45
fib_recursive gen 3.8 3.8 8.4 0.45
files gen 3.8 3.9 8.4 0.45
length gen 3.8 3.7 8.4 0.45
loops gen 3.8 3.8 8.4 0.45
tuple_return_value gen 3.9 3.7 8.5 0.46
fib_iter gen 3.9 3.8 8.4 0.47
containers gen 28.3 28.4 49.1 0.58
varargs gen 5.5 5.6 8.5 0.65

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cartesian gen 0 12 4 0.000
classes gen 0 0 12 0.000
control_flow gen 0 0 12 0.000
fib_iter gen 0 0 12 0.000
fib_recursive gen 0 4 12 0.000
gc_stack_roots gen 0 0 12 0.000
length gen 0 8 12 0.000
parse gen 0 0 16 0.000
tuple_return_value gen 0 4 8 0.000
modules gen 2 0 8 0.235
asdl_generated gen 4 0 12 0.307
cgi gen 4 4 12 0.332
containers gen 13 15 33 0.405
scoped_resource gen 4 8 8 0.493
varargs gen 47 50 53 0.892
escape gen 4 12 4 0.975
files gen 0 0 0 NA
loops gen 0 3 0 NA

raw benchmark files