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 christian.heimes
Recipients christian.heimes, ncoghlan, neologix, pitrou, python-dev, serhiy.storchaka
Date 2013-10-28.17:58:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <526EA5C7.8040203@cheimes.de>
In-reply-to <1382980537.57.0.955408809135.issue19183@psf.upfronthosting.co.za>
Content
Am 28.10.2013 18:15, schrieb Serhiy Storchaka:
> _PyHash_Fini() should be moved out too._Py_HashBytes() is only function which should be customized.

You still haven' convinced me to scatter hash-related functions over
multiple C files. And it won't work with a static definition of the hash
function and PyHash_FuncDef. They MUST be in one object file.

> Because it is redundant and only complicates the code, both use and declaration.

No, I disagree with you. It makes the code less complicated because it
encapsulates all related data in one place. Please provide a patch that
shows the contrary.

> There are other hash related functions (hashing integers, tuples). Only _Py_HashBytes() should be customized and only it worth moving to separated file.

Python doesn't have a hash function for integers anymore. It has a
specialized function for PyLongObject. pyhash.c contains common helper
functions.

> 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.

And it will clutter other code... Please provide a patch and benchmarks
for your proposal. I'll incorporate your patch if it have zero impact on
speed and doesn't make the code harder to understand.

> Let first land simplified patch and then you could add features such as PY_HASH_EXTERNAL and PyHash_FuncDef.

No, I'm not going to remove code in order to re-add it later. If you
don't like my PEP then please provide patches.
History
Date User Action Args
2013-10-28 17:58:32christian.heimessetrecipients: + christian.heimes, ncoghlan, pitrou, neologix, python-dev, serhiy.storchaka
2013-10-28 17:58:32christian.heimeslinkissue19183 messages
2013-10-28 17:58:32christian.heimescreate