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
fib_iter gen 8 8 895 0.009
modules gen 2 2 175 0.011
fib_recursive gen 11 8 873 0.012
loops gen 4 3 291 0.013
asdl_generated gen 11 7 379 0.029
containers gen 4 4 116 0.034
parse gen 29 27 785 0.037
scoped_resource gen 48 42 1,027 0.046
tuple_return_value gen 17 14 180 0.092
files gen 7 4 73 0.102
classes gen 3 3 23 0.141
length gen 45 41 203 0.219
cartesian gen 89 83 325 0.274
escape gen 104 97 354 0.294
cgi gen 265 268 516 0.514
varargs gen 27 19 15 1.788
control_flow gen 209 162 116 1.809
gc_stack_roots gen 2 0 0 inf

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.5 10.6 0.43
gc_stack_roots gen 3.5 3.4 7.1 0.50
parse gen 3.8 3.8 7.5 0.51
cgi gen 3.5 3.5 6.9 0.51
fib_recursive gen 3.7 3.9 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
cartesian gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.5 6.9 0.53
length gen 3.7 3.8 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
fib_iter gen 3.8 3.7 6.9 0.55
files gen 3.8 3.8 6.9 0.55
modules gen 3.8 3.8 6.9 0.55
tuple_return_value gen 3.8 3.7 6.9 0.55
control_flow gen 3.9 3.9 6.9 0.57
containers gen 28.7 28.7 47.4 0.60
varargs gen 5.6 5.6 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 4 8 0.000
classes gen 0 0 8 0.000
escape gen 0 8 4 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 4 12 0.000
files gen 0 4 4 0.000
gc_stack_roots gen 0 2 12 0.000
length gen 0 4 8 0.000
loops gen 0 0 4 0.000
modules gen 0 0 8 0.000
parse gen 0 0 12 0.000
scoped_resource gen 0 4 8 0.000
tuple_return_value gen 4 5 12 0.352
cartesian gen 4 4 8 0.482
containers gen 12 11 24 0.496
varargs gen 39 47 57 0.681
cgi gen 4 0 4 0.990
control_flow gen 0 0 0 NA

raw benchmark files