Hacker News new | ask | show | jobs
by mlthoughts2018 2421 days ago
The Cython example in that link is actually not a fair comparison, since it still forces the numpy ndarray type in the signature.

Instead it should use typed memoryviews [0], which are faster and can avoid more cases that will rely on the GIL accidentally (such as when an ndarray has to be treated as a Python object).

[0]: https://cython.readthedocs.io/en/latest/src/userguide/memory...