Christian Heimes added the comment:

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.

----------

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

Reply via email to