⚡️ Python bindings for a rust implementation of aapleby's MurMurHash.
Contributions are welcome! Please feel free to open issues and pull requests, and we'll do our best to react in a timely manner.
To develop locally, you will need:
- A dedicated Python environment
- The
requirements.txtpython libraries installed
pip install -r requirements.txtOnce you performed changes to the rust source code, you can build the project using:
maturin developAnd you will then be able to run the python unit tests:
pytestFirst, you should install murmurh using the release (optimised) build.
maturin develop --releaseThen, you can use timeit to benchmark:
python -m timeit -s "import murmurh" "murmurh.hash('foo')"1000000 loops, best of 5: 200 nsec per loop
python -m timeit -s "import mmh3" "mmh3.hash128('foo')"2000000 loops, best of 5: 136 nsec per loop