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
classes gen 0 3 15 0.000
fib_iter gen 8 8 885 0.009
modules gen 2 2 178 0.010
fib_recursive gen 11 7 889 0.012
loops gen 4 3 297 0.013
asdl_generated gen 5 6 369 0.015
containers gen 4 8 114 0.035
parse gen 29 27 768 0.038
scoped_resource gen 48 42 1,040 0.046
tuple_return_value gen 14 15 187 0.073
files gen 8 8 77 0.101
length gen 45 45 207 0.218
gc_stack_roots gen 2 2 8 0.247
cartesian gen 82 75 331 0.249
escape gen 96 103 349 0.277
cgi gen 250 267 508 0.493
varargs gen 20 29 28 0.688
control_flow gen 210 163 111 1.888

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.6 4.3 10.7 0.43
cartesian gen 3.5 3.7 7.1 0.50
fib_iter gen 3.5 3.7 7.1 0.50
asdl_generated 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.5 6.9 0.51
parse gen 3.9 3.8 7.6 0.52
escape gen 3.7 3.7 7.1 0.52
scoped_resource gen 3.7 3.7 7.1 0.52
tuple_return_value gen 3.7 3.7 7.1 0.52
fib_recursive gen 3.7 3.7 6.9 0.53
length gen 3.7 3.8 6.9 0.53
files gen 3.8 3.9 7.1 0.54
control_flow gen 3.8 3.9 6.9 0.55
loops gen 3.8 3.8 6.9 0.55
modules gen 3.8 3.5 6.9 0.55
containers gen 28.5 28.5 47.6 0.60
varargs gen 5.6 5.5 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
control_flow gen 0 0 4 0.000
fib_iter gen 0 0 12 0.000
fib_recursive gen 0 4 8 0.000
gc_stack_roots gen 0 0 4 0.000
length gen 0 0 8 0.000
loops gen 0 0 8 0.000
modules gen 0 0 4 0.000
parse gen 0 0 8 0.000
scoped_resource gen 0 4 4 0.000
classes gen 3 0 15 0.218
cgi gen 4 0 8 0.497
containers gen 12 8 24 0.511
asdl_generated gen 5 6 8 0.671
tuple_return_value gen 7 4 8 0.861
escape gen 8 0 8 1.014
varargs gen 47 38 45 1.051
cartesian gen 8 12 4 2.044
files gen 0 0 0 NA

raw benchmark files