Skip to content

Bind compression/decompression context to thread-local data for reuse #8

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

polvorin
Copy link

This allows to reuse the contexts between nif calls, having a noticeable impact on perf.

See
https://facebook.github.io/zstd/zstd_manual.html#Chapter4

The PR is not very polished (it will never deallocate the context, on nif reload for example). Altough we are using it as we don't need live nif upgrade.

Would you be ok on merging this if it where completed?.

Pablo Polvorin added 2 commits August 10, 2020 11:31
Simple, never deallocate, don't support reload, etc.
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.

1 participant