A replacement for dict using hopscotch hashing
Project description
py-hopscotch-dict
py-hopscotch-dict is a package that contains a replacement for the standard Python dict
which implements the concepts of hopscotch hashing, as explained in the foundational paper.
Hopscotch hashing provides a number of benefits over the methods used in the standard dict
implementation, most notably that additions, deletions and lookups have an expected O(1) runtime.
py-hopscotch-dict is implemented to replicate a Python 3.6-style dict
, and as such brings additional effects to Python 2.7 beyond those of hopscotch hashing.
py-hopscotch-dict has not been tested in a concurrent environment and thusly cannot be guaranteed to function correctly in conjunction with multi-threading, across multiple processes or in an asynchronous environment
Usage
>>> from py_hopscotch_dict import HopscotchDict
>>> d = HopscotchDict()
>>> d["test"] = True
>>> d
HopscotchDict({'test': True})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for py_hopscotch_dict-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | feab3e9fef48b23d6b3d20ca90d5bfbcd495a801472f5045348d962c658bd5e0 |
|
MD5 | 79f1698bd4a2f715c8a07e386cbb01ad |
|
BLAKE2b-256 | ef43e654b0753f0bc5be64a7879e10dd988e3fb138667d02640d2c30b11b449c |