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 179 0.000
fib_iter gen 8 4 896 0.008
fib_recursive gen 11 11 881 0.012
loops gen 4 0 298 0.014
asdl_generated gen 11 11 385 0.028
parse gen 22 27 759 0.030
containers gen 4 0 113 0.035
scoped_resource gen 45 46 1,023 0.044
tuple_return_value gen 20 18 182 0.112
files gen 8 8 70 0.113
classes gen 3 0 28 0.126
gc_stack_roots gen 2 2 8 0.218
length gen 45 38 201 0.224
cartesian gen 89 80 333 0.268
escape gen 98 89 352 0.277
cgi gen 253 253 516 0.490
varargs gen 16 27 24 0.636
control_flow gen 205 162 112 1.828

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.2 4.5 10.7 0.39
gc_stack_roots gen 3.4 3.5 6.9 0.49
parse gen 3.8 3.8 7.6 0.50
fib_recursive gen 3.7 3.8 7.1 0.52
asdl_generated gen 3.7 3.5 6.9 0.53
cgi gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
length gen 3.7 3.8 6.9 0.53
modules gen 3.7 3.7 6.9 0.53
cartesian gen 3.8 3.7 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
scoped_resource gen 3.8 3.7 7.1 0.54
control_flow gen 3.8 3.8 6.9 0.55
files gen 3.8 3.8 6.9 0.55
tuple_return_value gen 3.8 3.7 6.9 0.55
fib_iter gen 3.8 3.7 6.8 0.56
containers gen 28.5 28.7 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
asdl_generated gen 0 0 4 0.000
classes gen 0 3 4 0.000
fib_iter gen 0 4 4 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 0 8 0.000
gc_stack_roots gen 0 0 4 0.000
length gen 0 8 8 0.000
tuple_return_value gen 0 0 8 0.000
scoped_resource gen 4 0 16 0.256
cgi gen 4 0 12 0.332
modules gen 2 0 4 0.459
containers gen 12 15 23 0.507
parse gen 7 0 8 0.936
varargs gen 51 39 49 1.033
control_flow gen 8 0 4 1.969
escape gen 8 15 4 2.031
cartesian gen 4 8 0 inf
loops gen 0 3 0 NA

raw benchmark files