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
loops gen 0 3 293 0.000
fib_iter gen 4 8 895 0.004
modules gen 2 2 173 0.010
fib_recursive gen 11 11 896 0.012
parse gen 21 27 771 0.027
asdl_generated gen 11 11 378 0.028
scoped_resource gen 47 42 1,024 0.046
tuple_return_value gen 13 19 188 0.071
containers gen 11 7 112 0.102
files gen 7 0 65 0.114
length gen 38 36 217 0.173
classes gen 3 0 15 0.206
escape gen 94 93 356 0.263
cartesian gen 86 78 328 0.263
gc_stack_roots gen 2 0 4 0.435
cgi gen 269 244 540 0.497
varargs gen 16 16 16 1.044
control_flow gen 215 161 112 1.925

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.3 4.3 10.7 0.40
cartesian gen 3.5 3.7 7.1 0.50
gc_stack_roots gen 3.4 3.7 6.8 0.50
parse gen 3.8 3.8 7.6 0.50
asdl_generated gen 3.5 3.7 6.9 0.51
cgi gen 3.5 3.5 6.9 0.51
escape gen 3.5 3.5 6.9 0.51
control_flow gen 3.7 3.8 7.1 0.52
length gen 3.7 3.8 7.1 0.52
scoped_resource gen 3.7 3.8 7.1 0.52
loops gen 3.8 3.9 7.2 0.53
tuple_return_value gen 3.7 3.8 6.9 0.53
fib_recursive gen 3.8 3.7 6.9 0.55
files gen 3.8 3.9 6.9 0.55
modules gen 3.8 3.7 6.9 0.55
fib_iter gen 3.9 3.8 6.9 0.57
containers gen 28.7 28.5 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
asdl_generated gen 0 0 4 0.000
cgi gen 0 8 4 0.000
classes gen 0 3 15 0.000
control_flow gen 0 0 4 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 7 11 0.000
gc_stack_roots gen 0 2 8 0.000
modules gen 0 0 12 0.000
scoped_resource gen 0 4 4 0.000
containers gen 4 7 24 0.158
varargs gen 49 51 55 0.895
loops gen 4 0 4 0.910
fib_iter gen 4 0 4 0.950
cartesian gen 4 8 4 0.981
parse gen 8 0 8 1.036
tuple_return_value gen 7 0 4 1.672
length gen 8 8 4 1.864
escape gen 12 16 4 2.929

raw benchmark files