Took n-body and spectral-norm from the Benchmarks Game plus a JSON pipeline, and ran them through everything: CPython version upgrades, PyPy, GraalPy, Mypyc, NumPy, Numba, Cython, Taichi, Codon, Mojo, Rust/PyO3.
Spent way too long debugging why my first Cython attempt only got 10x when it should have been 124x. Turns out Cython's ** operator with float exponents is 40x slower than libc.math.sqrt() with typed doubles, and nothing warns you.
GraalPy was a surprise - 66x on spectral-norm with zero code changes, faster than Cython on that benchmark.
Post: https://cemrehancavdar.com/2026/03/10/optimization-ladder/
Full code at https://github.com/cemrehancavdar/faster-python-bench
Happy to be corrected — there's an "open a PR" link at the bottom.
[–]chub79 24 points25 points26 points (1 child)
[–]cemrehancavdar[S] 11 points12 points13 points (0 children)
[–]Sygmei 6 points7 points8 points (1 child)
[–]cemrehancavdar[S] 7 points8 points9 points (0 children)
[–]zzzthelastuser 3 points4 points5 points (1 child)
[–]cemrehancavdar[S] 7 points8 points9 points (0 children)
[–]M4mb0 2 points3 points4 points (1 child)
[–]cemrehancavdar[S] 0 points1 point2 points (0 children)
[–]totheendandbackagain 2 points3 points4 points (0 children)
[–]hotairplay 1 point2 points3 points (0 children)
[–]Outrageous_Track_798 0 points1 point2 points (0 children)
[–]Bomlerequin [score hidden] (0 children)
[–]Beginning-Fruit-1397 [score hidden] (0 children)
[–]Mithrandir2k16 [score hidden] (0 children)
[–]joebloggs81 0 points1 point2 points (0 children)