Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
fib_iter | 0.0 | 806.9 | 0.000 |
scoped_resource | 7.9 | 840.0 | 0.009 |
asdl_generated | 4.1 | 365.6 | 0.011 |
fib_recursive | 11.1 | 942.7 | 0.012 |
loops | 4.4 | 337.9 | 0.013 |
tuple_return_value | 3.6 | 129.8 | 0.028 |
classes | 2.0 | 29.5 | 0.067 |
cgi | 66.2 | 514.0 | 0.129 |
escape | 73.9 | 370.9 | 0.199 |
length | 38.8 | 182.4 | 0.213 |
containers | 27.2 | 112.7 | 0.241 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | C++ | Python | C++ : Python |
loops | 2.9 | 7.3 | 0.39 |
tuple_return_value | 2.7 | 7.0 | 0.39 |
scoped_resource | 2.9 | 7.2 | 0.40 |
cgi | 2.9 | 7.0 | 0.41 |
length | 2.9 | 7.0 | 0.42 |
asdl_generated | 2.9 | 6.9 | 0.42 |
fib_recursive | 2.9 | 6.9 | 0.42 |
escape | 3.0 | 7.0 | 0.43 |
fib_iter | 3.0 | 7.0 | 0.43 |
classes | 3.2 | 7.3 | 0.44 |
containers | 36.1 | 47.6 | 0.76 |
c++
.