This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients christian.heimes, ncoghlan, neologix, pitrou, python-dev, serhiy.storchaka
Date 2013-10-28.17:15:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1382980537.57.0.955408809135.issue19183@psf.upfronthosting.co.za>
In-reply-to
Content
> Because you can't simple replace the files.
  
Why not? This looks as simplest option when you build hard customized CPython.
 
>  It also contains _Py_HashBytes() and  _PyHash_Fini().
  
_PyHash_Fini() should be moved out too._Py_HashBytes() is only function which should be customized.
 
> I don't understand why you want me to get rid of the struct. What's your
 > argument against the struct? I like the PyHash_FuncDef because it groups
 > all information (func ptr, name, hash metadata) in a single structure.
  
Because it is redundant and only complicates the code, both use and declaration.
 
> > Why _Py_HashDouble() and _Py_HashPointer() are moved to pyhash.c? They are
 > > hash algorithm agnostic, and it is unlikely they will be redefined in
 > > custom build.
 > I have moved the functions to pyhash.c in order to keep all related
 > internal function in one file. They do not belong in Objects/object.c.
  
There are other hash related functions (hashing integers, tuples). Only _Py_HashBytes() should be customized and only it worth moving to separated file.
 
> > You not need the HAVE_ALIGNED_REQUIRED macros if use PY_UHASH_CPY (or
 > > something like for exact 64 bit) in siphash24. On platforms where aligned
 > > access is required you will use per-bytes copy, otherwise you will use
 > > fast 64-bit copy.
 > I'm not going to make siphash24 compatible with platforms that require
 > aligned memory for integers. It's an unnecessary complication and
 > slow-down for all common platforms. The feature will simply not be
 > available on archaic architectures.
  
The benefit is that the code will be simpler if get rid from HAVE_ALIGNED_REQUIRED and related code in ./configure. Only on such archaic architectures hash code will be slower.
 
> Serhiy, I would like to land my patch before beta 1 hits the fan. We can
 > always improve the code during beta. Right now I don't want to mess around
 > with SipHash24 code. That includes non-64bit platforms as well as
 > architectures that enforce aligned memory for integers.
  
Let first land simplified patch and then you could add features such as PY_HASH_EXTERNAL and PyHash_FuncDef.
History
Date User Action Args
2013-10-28 17:15:37serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, pitrou, christian.heimes, neologix, python-dev
2013-10-28 17:15:37serhiy.storchakasetmessageid: <1382980537.57.0.955408809135.issue19183@psf.upfronthosting.co.za>
2013-10-28 17:15:37serhiy.storchakalinkissue19183 messages
2013-10-28 17:15:37serhiy.storchakacreate