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
containers gen 0 0 122 0.000
fib_iter gen 8 8 915 0.009
modules gen 2 0 175 0.012
fib_recursive gen 11 11 897 0.012
loops gen 4 3 298 0.013
asdl_generated gen 7 7 372 0.020
parse gen 30 23 778 0.038
scoped_resource gen 41 38 1,062 0.039
tuple_return_value gen 14 18 190 0.073
files gen 7 7 72 0.102
classes gen 3 0 20 0.165
length gen 40 44 202 0.200
gc_stack_roots gen 2 2 8 0.220
escape gen 81 100 347 0.233
cartesian gen 93 81 326 0.285
varargs gen 8 16 27 0.293
cgi gen 250 268 513 0.488
control_flow gen 208 162 106 1.957

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.3 10.8 0.41
gc_stack_roots gen 3.4 3.4 7.1 0.48
parse gen 3.7 3.8 7.6 0.48
cgi gen 3.5 3.7 6.8 0.52
cartesian gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
modules gen 3.8 3.7 7.1 0.54
asdl_generated gen 3.7 3.5 6.8 0.54
control_flow gen 3.8 3.9 6.9 0.55
fib_iter gen 3.8 3.8 6.9 0.55
fib_recursive gen 3.8 3.8 6.9 0.55
length gen 3.8 3.7 6.9 0.55
scoped_resource gen 3.8 3.5 6.9 0.55
tuple_return_value gen 3.8 3.7 6.9 0.55
files gen 3.9 3.9 6.9 0.57
containers gen 28.5 28.5 47.5 0.60
varargs gen 5.5 5.5 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cartesian gen 0 8 8 0.000
classes gen 0 3 12 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 0 12 0.000
files gen 0 0 4 0.000
gc_stack_roots gen 0 0 4 0.000
loops gen 0 0 8 0.000
modules gen 0 2 8 0.000
parse gen 0 4 8 0.000
asdl_generated gen 4 4 12 0.304
scoped_resource gen 7 8 16 0.468
length gen 4 0 8 0.511
containers gen 16 15 20 0.775
tuple_return_value gen 7 0 8 0.877
varargs gen 59 51 46 1.283
escape gen 23 4 8 2.900
cgi gen 4 0 0 inf
fib_recursive gen 0 0 0 NA

raw benchmark files