Message415923
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? |
|
Date |
User |
Action |
Args |
2022-03-24 04:32:00 | methane | set | recipients:
+ methane, christian.heimes, serhiy.storchaka, malin, brandtbucher |
2022-03-24 04:32:00 | methane | set | messageid: <1648096320.55.0.60884182679.issue46864@roundup.psfhosted.org> |
2022-03-24 04:32:00 | methane | link | issue46864 messages |
2022-03-24 04:32:00 | methane | create | |
|