Skip to content

Comments

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

Open
polvorin wants to merge 2 commits intomururu:masterfrom
polvorin:reuse_ctx
Open

Bind compression/decompression context to thread-local data for reuse#8
polvorin wants to merge 2 commits intomururu:masterfrom
polvorin:reuse_ctx

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