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 tim.peters
Recipients eric.smith, jdemeyer, mark.dickinson, rhettinger, sir-sigurd, tim.peters
Date 2018-09-25.00:42:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Just noting that this Bernstein-like variant appears to work as well as the FNV-1a version in all the goofy ;-) endcase tests I've accumulated:

    while (--len >= 0) {
        y = PyObject_Hash(*p++);
        if (y == -1)
            return -1;
        Py_uhash_t t = (Py_uhash_t)y;
        t ^= t << 7;
        x = x * mult + t;

They're identical except for the last line.  FNV-1a uses

         x = (x ^ t) * mult;

Date User Action Args
2018-09-25 00:42:29tim.peterssetrecipients: + tim.peters, rhettinger, mark.dickinson, eric.smith, jdemeyer, sir-sigurd
2018-09-25 00:42:29tim.peterssetmessageid: <>
2018-09-25 00:42:29tim.peterslinkissue34751 messages
2018-09-25 00:42:28tim.peterscreate