Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
modules | 0.8 | 175.0 | 0.005 |
asdl_generated | 2.9 | 345.2 | 0.008 |
fib_iter | 6.4 | 708.2 | 0.009 |
loops | 3.5 | 314.6 | 0.011 |
scoped_resource | 8.7 | 751.0 | 0.012 |
fib_recursive | 10.7 | 856.4 | 0.012 |
tuple_return_value | 3.5 | 96.7 | 0.036 |
classes | 1.9 | 21.3 | 0.088 |
strings | 0.9 | 7.2 | 0.131 |
containers | 15.7 | 95.2 | 0.165 |
cgi | 82.0 | 458.7 | 0.179 |
escape | 60.2 | 317.7 | 0.189 |
length | 29.7 | 137.4 | 0.216 |
varargs | 2.7 | 4.7 | 0.575 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | C++ | Python | C++ : Python |
strings | 2.8 | 7.6 | 0.37 |
modules | 3.0 | 7.6 | 0.39 |
tuple_return_value | 2.9 | 7.4 | 0.39 |
fib_iter | 2.9 | 7.5 | 0.39 |
loops | 3.0 | 7.7 | 0.39 |
scoped_resource | 3.1 | 7.8 | 0.40 |
fib_recursive | 3.0 | 7.4 | 0.40 |
varargs | 3.1 | 7.4 | 0.41 |
escape | 3.2 | 7.4 | 0.43 |
length | 3.2 | 7.5 | 0.43 |
cgi | 3.3 | 7.5 | 0.44 |
classes | 3.4 | 7.6 | 0.44 |
asdl_generated | 3.4 | 7.4 | 0.47 |
containers | 36.3 | 48.0 | 0.76 |
c++
.