[New-bugs-announce] [issue24762] Branchless, vectorizable frozen set hash
Raymond Hettinger
report at bugs.python.org
Fri Jul 31 07:13:36 CEST 2015
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 <report at bugs.python.org>
<http://bugs.python.org/issue24762>
_______________________________________
More information about the New-bugs-announce
mailing list