You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed a new PR on zstd gyscos/zstd-rs#247 that optimizes zstd::stream::Encoder by reusing zstd context:
From profiling, I have found that creating a zstd::stream::Encoder and using it to encode a small amount of bytes (less than 100) takes over 200 microseconds per encode on my machine. The vast majority of this time is related to the creation of new zstd contexts, so this PR adds a simple method on Encoder and Decoder that allows one to supply an external context from zstd_safe instead. With these changes, performance is improved - the previously-mentioned benchmark takes less than 2 microseconds per encode.
I noticed a new PR on zstd gyscos/zstd-rs#247 that optimizes
zstd::stream::Encoder
by reusing zstd context:from @DouglasDwyer
Seems like a good idea to support this once it is merged.
The text was updated successfully, but these errors were encountered: