News for hackers. Stuff that matters.
Re:Python 3.11 is faster than 3.8 by stavros on Wednesday October 26, 2022 @02:12PM (#33347335)
Can you try PyPy as well?
Re:Python 3.11 is faster than 3.8 by Shish2k on Wednesday October 26, 2022 @02:39PM (#33347632)
Apparently not :( (These benchmarks were done on an M1 MacBook Pro)

$ brew install pypy3 pypy3: The x86_64 architecture is required for this software.

Re:Python 3.11 is faster than 3.8 by verst on Wednesday October 26, 2022 @02:43PM (#33347677)
$ brew install pyenv

$ pyenv install pypy3.9-7.3.9

I like using PyEnv for managing my Python versions. It will natively compile Python builds and should be doing the same on M1 (which is what I'm using). `pyenv install --list` shows you what is available.

EDIT: Not sure why they don't have newer versions of PyPy there (I don't use PyPy) but all it takes is a PR to here: https://github.com/pyenv/pyenv

Re:Python 3.11 is faster than 3.8 by Shish2k on Wednesday October 26, 2022 @03:36PM (#33348294)
Thanks! Added to the list, it’s suspiciously only a little bit faster than CPython 3.11 though, which probably needs more investigation...
Re:Python 3.11 is faster than 3.8 by hnov on Wednesday October 26, 2022 @05:02PM (#33349396)
That makes sense because pypy can JIT a ladder of if/else to a compare/jump conditional each whereas a dict lookup can be an order of magnitude more complex. If they're 8bit opcodes, maybe having a list based lookup table will perform similarly on py3000 and still optimize on pypy?

Or maybe https://docs.python.org/3/library/array.html rather than list.