classification
Title: Optimize round_size for rehashing
Type: performance Stage: patch review
Components: Interpreter Core Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: jneb, jstasiak, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2020-12-18 09:35 by jneb, last changed 2020-12-29 17:55 by jneb.

Pull Requests
URL Status Linked Edit
PR 23833 open jneb, 2020-12-18 09:36
Messages (5)
msg383291 - (view) Author: Jurjen N.E. Bos (jneb) * Date: 2020-12-18 09:35
There's a trivial optimization in the round_size in hashtable.c:
a loop is used to compute the lowest power of two >= s,
while this can be done in one step with bit_length.
I am making a pull request for this.
msg383294 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-18 10:14
Do you have any benchmarks?
msg383302 - (view) Author: Jakub Stasiak (jstasiak) * Date: 2020-12-18 15:33
I'd be especially curious about branch (mis)prediction stats before and after applying this patch – including such information seems necessary in a patch that's about optimization.
msg383991 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-29 12:42
Since no benchmarking data was provided, I suggest to close this issue. We do not accept optimization changes without evidences of performance boost.
msg384017 - (view) Author: Jurjen N.E. Bos (jneb) * Date: 2020-12-29 17:55
Harsh, but fair.
I'll do a better job next time!

Op di 29 dec. 2020 13:42 schreef Serhiy Storchaka <report@bugs.python.org>:

>
> Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment:
>
> Since no benchmarking data was provided, I suggest to close this issue. We
> do not accept optimization changes without evidences of performance boost.
>
> ----------
> status: open -> pending
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue42673>
> _______________________________________
>
History
Date User Action Args
2020-12-29 17:55:45jnebsetstatus: pending -> open

messages: + msg384017
2020-12-29 12:42:03serhiy.storchakasetstatus: open -> pending

messages: + msg383991
2020-12-18 15:33:12jstasiaksetnosy: + jstasiak
messages: + msg383302
2020-12-18 10:14:35serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg383294
2020-12-18 09:36:43jnebsetkeywords: + patch
stage: patch review
pull_requests: + pull_request22692
2020-12-18 09:35:27jnebcreate