it is easier to create colliding strings. A cutoff of 7 on 64-bit platforms
and 5 on 32-bit platforms should provide a decent safety margin.
+ This corresponds to the :data:`sys.hash_info.cutoff` constant.
+
.. versionadded:: 3.4
The `Mersenne prime <https://en.wikipedia.org/wiki/Mersenne_prime>`_ ``P = 2**n -1``,
used for numeric hash scheme.
+
This corresponds to the :data:`sys.hash_info.modulus` constant.
.. versionadded:: 3.13
.. c:macro:: PyHASH_BITS
The exponent ``n`` of ``P`` in :c:macro:`PyHASH_MODULUS`.
- This corresponds to the :data:`sys.hash_info.hash_bits` constant.
.. versionadded:: 3.13
.. c:macro:: PyHASH_INF
The hash value returned for a positive infinity.
+
This corresponds to the :data:`sys.hash_info.inf` constant.
.. versionadded:: 3.13
.. c:macro:: PyHASH_IMAG
The multiplier used for the imaginary part of a complex number.
+
This corresponds to the :data:`sys.hash_info.imag` constant.
.. versionadded:: 3.13
Hash function name (UTF-8 encoded string).
+ This corresponds to the :data:`sys.hash_info.algorithm` constant.
+
.. c:member:: const int hash_bits
Internal size of the hash value in bits.
+ This corresponds to the :data:`sys.hash_info.hash_bits` constant.
+
.. c:member:: const int seed_bits
Size of seed input in bits.
+ This corresponds to the :data:`sys.hash_info.seed_bits` constant.
+
.. versionadded:: 3.4
The size of the seed key of the hash algorithm
+ .. attribute:: hash_info.cutoff
+
+ Cutoff for small string DJBX33A optimization in range ``[1, cutoff)``.
+
.. versionadded:: 3.2
.. versionchanged:: 3.4
- Added *algorithm*, *hash_bits* and *seed_bits*
+ Added *algorithm*, *hash_bits*, *seed_bits*, and *cutoff*.
.. data:: hexversion