A benchmark of Python implementations on matrix based algorithms

Authors

  • Andrew M. Bañas ⋅ PH UP Intelligent Systems Center, University of the Philippines System
  • Kristian Karl Santos ⋅ PH UP Intelligent Systems Center, University of the Philippines System
  • Johnrob Bantang ⋅ PH UP Intelligent Systems Center, University of the Philippines System, and National Institute of Physics and Computational Science Research Center, University of the Philippines Diliman

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.

Published

2026-06-09

How to Cite

[1]
AM Bañas, KK Santos, and J Bantang, A benchmark of Python implementations on matrix based algorithms, in Proceedings of the 44th Samahang Pisika ng Pilipinas Physics Conference (Philippines, 2026), SPP-2026-PB-36. URL: https://proceedings.spp-online.org/article/view/SPP-2026-PB-36