[issue24762] Branchless, vectorizable frozen set hash
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24762 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24762] Branchless, vectorizable frozen set hash
Serhiy Storchaka added the comment: The idea looks interesting and the code looks correct. But the patch decreases readability and I'm not sure, that the benefit is worth it. Timings looks good at first glance, but frozenset hash is cached and is calculated only once per instance. I afraid that the benefit of hash calculation optimization is dwarfed by the time of frozenset creation itself. If other core developer supports this idea I have no strong objections. See my comments on Rietveld. -- assignee: serhiy.storchaka - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24762 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24762] Branchless, vectorizable frozen set hash
Roundup Robot added the comment: New changeset cf707dd190a9 by Raymond Hettinger in branch 'default': Issue #24762: Speed-up frozenset_hash() and greatly beef-up the comments. https://hg.python.org/cpython/rev/cf707dd190a9 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24762 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24762] Branchless, vectorizable frozen set hash
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24762 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24762] Branchless, vectorizable frozen set hash
Changes by Raymond Hettinger raymond.hettin...@gmail.com: Added file: http://bugs.python.org/file40081/timings_fasthash_clang.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24762 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24762] Branchless, vectorizable frozen set hash
New submission from Raymond Hettinger: Speed-up frozenset_hash(). Switching to an entry++ style loop instead of set_next() eliminates much of the loop overhead. Removing the key=NULL or key==dummy checks eliminates the unpredictable branches and makes the loop vectorizable. Those benefits outweigh the extra work of doing a multiplication for every row in set table rather than just the non-null, non-dummy entries. To make sure the overall hash value is unchanged, there are two final clean-up steps to undo the effect of including dummy and null entries. -- assignee: serhiy.storchaka components: Interpreter Core files: fashhash_nobranch.diff keywords: patch messages: 247735 nosy: rhettinger, serhiy.storchaka priority: low severity: normal stage: patch review status: open title: Branchless, vectorizable frozen set hash type: performance versions: Python 3.6 Added file: http://bugs.python.org/file40079/fashhash_nobranch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24762 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24762] Branchless, vectorizable frozen set hash
Changes by Raymond Hettinger raymond.hettin...@gmail.com: Added file: http://bugs.python.org/file40080/timings_fasthash.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24762 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com