A benchmark of Python implementations on matrix based algorithms
Abstract
We benchmark different implementations of the Python programming language: CPython, and alternatives, PyPy and Mojo, against different matrix based algorithms: matrix multiplication, a 2D fast Fourier transform and block LU decomposition. Algorithms were implemented in pure Python, only using standard modules then tested across the different Python implementations. Using the language without third party libraries enables us to measure the interpreters' performance in isolation. We discuss the differences in execution strategies and how they affect the reported benchmarks. Benchmark results from multiple implementations of the same language provide options for efficiently utilizing shared computational resources, while maintaining the same numerical results and reducing the need of porting code into another language.



