Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Implement support for fast integer digest using "xxhash". #1149

Merged
merged 2 commits into from
May 9, 2023

Conversation

KelSolaar
Copy link
Member

Summary

This PR implements support for fast integer digest using xxhash with the colour.utilities.int_digest definition. If xxhash is not available it falls back to the builtin hash definition.

The main use case is hashing of the ndarray as highlighted in PR #1120.

Preflight

Code Style and Quality

  • Unit tests have been implemented and passed.
  • Pyright static checking has been run and passed.
  • Pre-commit hooks have been run and passed.
  • [N/A] New transformations have been added to the Automatic Colour Conversion Graph.
  • [N/A] New transformations have been exported to the relevant namespaces, e.g. colour, colour.models.

Documentation

  • New features are documented along with examples if relevant.
  • The documentation is Sphinx and numpydoc compliant.

@KelSolaar KelSolaar added this to the v0.4.3 milestone May 5, 2023
@coveralls
Copy link

coveralls commented May 5, 2023

Coverage Status

Coverage: 99.784% (-0.003%) from 99.787% when pulling 4d3dc25 on feature/xxhash into 95592e5 on develop.

@KelSolaar KelSolaar force-pushed the feature/xxhash branch 3 times, most recently from d2f7185 to 17509d8 Compare May 6, 2023 00:59
return -1

else:
int_digest = hash # pyright: ignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this line need #pragma: no cover?

Otherwise I don't see any issues and this looks ready to merge.

@KelSolaar KelSolaar merged commit 6840aa9 into develop May 9, 2023
@KelSolaar
Copy link
Member Author

Merged, thank you!

@KelSolaar KelSolaar deleted the feature/xxhash branch May 9, 2023 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants