This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients brandtbucher, christian.heimes, malin, methane, serhiy.storchaka
Date 2022-03-24.04:32:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648096320.55.0.60884182679.issue46864@roundup.psfhosted.org>
In-reply-to
Content
First of all, this is just deprecating direct access of `ob_shash`. This makes users need to use `PyObject_Hash()`.
We don't make the final decision about removing it. We just make we can remove it in Python 3.13.

RAM and CACHE efficiency is not the only motivation for this.
There is a discussion about (1) increasing CoW efficiency, and (2) sharing data between subinterpreters after per-interpreter GIL.
Removing ob_shash will help them, especially about the (2).

But if we stop using bytes objects in code objects by Python 3.13, there is no need to remove ob_shash.


> If put a bytes object into multiple dicts/sets, the hash need to be computed multiple times. This seems a common usage.

Doesn't it lose only some milliseconds?
I posted remove-bytes-hash.patch in this issue. Would you measure how this affects whole application performance rather than micro benchmarks?
History
Date User Action Args
2022-03-24 04:32:00methanesetrecipients: + methane, christian.heimes, serhiy.storchaka, malin, brandtbucher
2022-03-24 04:32:00methanesetmessageid: <1648096320.55.0.60884182679.issue46864@roundup.psfhosted.org>
2022-03-24 04:32:00methanelinkissue46864 messages
2022-03-24 04:32:00methanecreate