top | item 37742404

(no title)

karlicoss | 2 years ago

Another thing I noticed is that homebrew python was noticeably slower on M2 comparing to the pyenv one. I imagine homebrew compiles it with too generic flags to support wide range of macs.

discuss

order

shpx|2 years ago

From my looking around, Homebrew's Python 3.11 has specific binaries for each macOS and CPU architecture

https://github.com/Homebrew/homebrew-core/blob/c1321e2629203...

A comment in Homebrew's formula says that Homebrew adds the --enable-optimizations flag during compilation because Homebrew has separate binaries whereas the official Python release doesn't add this flag because "they want one build that will work across many macOS releases"

https://github.com/Homebrew/homebrew-core/blob/c1321e2629203...

and it looks to me that pyenv just installs the official binary

https://github.com/pyenv/pyenv/blob/28e7000b485bff61235d8a69...

So I would expect it to be the other way around, Homebrew's Python should be faster.