Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A replacement for dict using hopscotch hashing

Project description


Travis Codecov Python Versions Package Version License

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


>>> from py_hopscotch_dict import HopscotchDict
>>> d = HopscotchDict()
>>> d["test"] = True
>>> d
HopscotchDict({'test': True})

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for py-hopscotch-dict, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size py_hopscotch_dict-1.0.2-py2.py3-none-any.whl (13.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size py-hopscotch-dict-1.0.2.tar.gz (15.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page