News for hackers. Stuff that matters.
Re:Python Standard Library changes in recent years by saagarjha on Saturday May 21, 2022 @04:41AM (#31456294)
Sadly it does not call into the hardware implementation: https://github.com/python/cpython/blob/f62ad4f2c4214fdc05cc4...
Re:Python Standard Library changes in recent years by orlp on Saturday May 21, 2022 @04:53AM (#31456352)
It does. Note that it calls popcount_digit on each digit of the integer (a 'digit' here is 32 bits), which calls _Py_popcount32, which does map to a hardware instruction if possible: https://github.com/python/cpython/blob/f62ad4f2c4214fdc05cc4...
Re:Python Standard Library changes in recent years by saagarjha on Saturday May 21, 2022 @05:18AM (#31456454)
Ah, you are correct. Although I still take issue with "fast" in the comment I was replying to ;)