=======
**Sharing memory based** Hash Table extension for Python
For examples, see test cases in python files (pyshmht/Cacher.py, pyshmht/HashTable.py), where you can find performance tests as well.
Performance
===========
capacity=200M, 64 bytes key/value tests, tested on (Xeon E5-2670 0 @ 2.60GHz, 128GB ram)
* hashtable.c (raw hash table in c, tested on `malloc`ed memory)
> set: 0.93 Million iops;
> get: 2.35 Million iops;
* performance\_test.py (raw python binding)
> set: 451k iops;
> get: 272k iops;
* HashTable.py (simple wrapper, no serialization)
> set: 354k iops;
> get: 202k iops;
* Cacher.py (cached wrapper, with serialization)
> set: 501k iops (cached), 228k iops (after write\_back);
> get: 560k iops (cached), 238k iops (no cache);
* python native dict
> set: 741k iops;
> get: 390k iops;
Notice
======
In hashtable.c, default max key length is `256 - 4`, max value length is `1024 - 4`; you can change `bucket_size` and `max_key_size` manually, but bear in mind that increasing these two arguments will result in larger memory consumption.
If you find any bugs, please submit an issue or send me a pull request, I'll see to it ASAP :)
p.s. `hashtable.c` is independent (i.e. has nothing to do with python), you can use it in other projects if needed. :P
Metadata
Release files for pyshmht 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyshmht-0.0.2.tar.gz | 9.4 kB | Without provenance | Details |
Release files / pyshmht-0.0.2.tar.gz
| Download URL | pyshmht-0.0.2.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dde01c386c92722230b63e3df2fda6395182c4411b493dead40f730cfa23c194
|
|
BLAKE2b-256 checksum How to use checksums |
584ded2c4c58679c66eb260fa2ea61199c9c57aa302e2a3c64ba84293402af42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyshmht 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.