Py-hopscotch-dict

Latest version: v2.1.2

Safety actively analyzes 629959 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

1.0.3

In previous releases, locations in what was _indices that were less than one neighborhood of distance from the end of _indices had reduced neighborhoods; in particular, the last location in _indices had no neighborhood at all - if two keys both mapped to the last location the dict would have to resize until they mapped to different locations.

Since the size of _indices is a power of two, keys would map to the same location if the absolute value of their hashes have the same least significant bits modulo the size of _indices (e.g. if _indices is size 2^24, keys collide if their absolute hash values have the same 24 least significant bits).

Since the dict can only solve the issue of an overfilled neighborhood by resizing, in the case of two keys mapping to the last location of _indices the dict would have to resize until it found the least significant bit where the keys' absolute hash values differed.

In the case that bit was high (e.g. greater than 20), excessive memory usage would occur.

This release fixes the above bug and makes some low-level changes that should hopefully improve performance.

1.0.2

So, you remember that bug I thought I fixed in the last release? Well, when I "fixed" it I broke it the other way around so the wheel could load the VERSION file but not when installing using `pip -e .`, which broke tests.

Hopefully with this release both the wheels _and_ test environments can see the file.

:crossed_fingers:

1.0.1

v1.0.0 had an issue with the VERSION file that showed when you installed the wheel, but not when you installed using `pip install -e .`, which was frustrating.

1.0.0

After futzing with directory structure and completing all the Python package/PyPI boilerplate, the library is finally ready to be released.

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.