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_recursive gen 7 11 878 0.008
fib_iter gen 8 4 883 0.009
modules gen 2 2 173 0.010
loops gen 4 3 291 0.013
asdl_generated gen 11 11 370 0.031
parse gen 30 27 776 0.038
scoped_resource gen 44 46 1,040 0.042
containers gen 8 7 113 0.069
files gen 7 4 68 0.108
tuple_return_value gen 21 18 179 0.115
classes gen 3 3 26 0.123
length gen 34 45 204 0.166
cartesian gen 92 84 328 0.280
escape gen 100 100 347 0.287
gc_stack_roots gen 2 0 4 0.457
cgi gen 251 238 512 0.491
varargs gen 12 12 12 0.961
control_flow gen 209 161 106 1.968

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.5 10.8 0.40
cgi gen 3.4 3.7 7.1 0.48
parse gen 3.8 3.8 7.5 0.51
loops gen 3.7 3.8 7.2 0.51
fib_recursive gen 3.5 3.8 6.9 0.51
gc_stack_roots gen 3.5 3.5 6.9 0.51
cartesian gen 3.7 3.7 7.1 0.52
asdl_generated gen 3.7 3.5 6.9 0.53
fib_iter gen 3.7 3.7 6.9 0.53
modules gen 3.8 3.7 7.1 0.54
scoped_resource gen 3.8 3.8 7.1 0.54
escape gen 3.7 3.7 6.8 0.54
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.7 6.9 0.55
control_flow gen 3.9 3.8 6.9 0.57
containers gen 28.7 28.8 47.6 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 8 0.000
cartesian gen 0 8 8 0.000
classes gen 0 0 4 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 4 8 0.000
files gen 0 4 8 0.000
gc_stack_roots gen 0 2 8 0.000
loops gen 0 0 8 0.000
modules gen 0 0 8 0.000
parse gen 0 0 12 0.000
tuple_return_value gen 0 0 16 0.000
containers gen 8 7 24 0.320
fib_recursive gen 4 0 8 0.451
escape gen 4 4 8 0.499
cgi gen 4 16 8 0.499
varargs gen 54 54 61 0.897
scoped_resource gen 4 0 4 1.004
length gen 11 0 4 2.824

raw benchmark files