Message201563
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. |
|
Date |
User |
Action |
Args |
2013-10-28 17:58:32 | christian.heimes | set | recipients:
+ christian.heimes, ncoghlan, pitrou, neologix, python-dev, serhiy.storchaka |
2013-10-28 17:58:32 | christian.heimes | link | issue19183 messages |
2013-10-28 17:58:32 | christian.heimes | create | |
|