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

Reply via email to