Serhiy Storchaka added the comment:

> The patch is too optimistic, it gives different results depending on the 
> alignment of the memory buffer:

So this method is not applicable for a byte.  Here is a patch only for strings.

If a fast hash for bytes/memoryview is desirable, I can write a fast robust 
implementation for nonaligned data.  But this will be more cumbersome and a bit 
slower.

----------
Added file: http://bugs.python.org/file27950/fast_str_hash.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16427>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to