Open alexjc opened 1 year ago
The iscc
package on PyPI is out of date. It will eventually be updated when the final ISO standard is published.
The current reference implementation can be found at https://github.com/iscc/iscc-core.
We have added some basic optional Cython support there. Pull requests for performance improvement are very welcome. An up-to-date higher level lib with content extraction support can be found here: https://github.com/iscc/iscc-sdk.
I know this is a reference implementation, but it's the one that uses the
iscc
package name on PyPI and as such will be the most used. Thus, here's a big performance suggestion.The bottleneck in hashing long texts is minimum_hash. This is a much faster version. Compile with
This is the code:
You can also use setup.py to build the module:
Until it's integrated, I monkey patch it like so:
The last function is a good place to insert comparison of the results with the slow version. I hashed hundreds of long documents to check they are identical.