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 23 0.000
modules gen 0 2 178 0.000
fib_iter gen 8 8 891 0.009
loops gen 4 3 316 0.012
fib_recursive gen 11 11 881 0.012
asdl_generated gen 7 11 374 0.019
parse gen 25 23 771 0.033
scoped_resource gen 39 34 1,028 0.038
containers gen 8 7 89 0.088
tuple_return_value gen 21 11 188 0.109
files gen 7 8 68 0.111
gc_stack_roots gen 2 0 8 0.215
cartesian gen 72 81 332 0.217
length gen 46 38 204 0.227
escape gen 101 101 341 0.296
cgi gen 265 269 513 0.516
varargs gen 16 20 20 0.784
control_flow gen 207 161 110 1.876

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
gc_stack_roots gen 3.4 3.5 6.9 0.49
parse gen 3.8 3.9 7.5 0.51
cartesian gen 3.7 3.7 7.1 0.52
scoped_resource gen 3.7 3.8 7.1 0.52
asdl_generated gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.5 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
cgi gen 3.8 3.7 6.9 0.55
fib_iter gen 3.8 3.5 6.9 0.55
fib_recursive gen 3.8 3.8 6.9 0.55
files gen 3.8 3.8 6.9 0.55
length gen 3.8 3.8 6.9 0.55
tuple_return_value gen 3.8 3.8 6.9 0.55
control_flow gen 3.9 3.9 6.9 0.57
modules gen 3.9 3.8 6.9 0.57
containers gen 28.6 28.6 47.5 0.60
varargs gen 5.5 5.4 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 0 8 0.000
gc_stack_roots gen 0 2 4 0.000
length gen 0 8 8 0.000
loops gen 0 0 8 0.000
tuple_return_value gen 0 7 4 0.000
containers gen 8 7 49 0.161
escape gen 4 4 12 0.335
classes gen 3 0 8 0.416
modules gen 2 0 4 0.446
asdl_generated gen 4 0 8 0.452
varargs gen 51 47 52 0.980
cgi gen 4 0 4 0.986
control_flow gen 4 0 4 1.010
parse gen 4 4 4 1.064
scoped_resource gen 8 11 4 1.970
cartesian gen 20 8 4 5.001

raw benchmark files