-
Notifications
You must be signed in to change notification settings - Fork 59
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
use lz4_flex? #85
Comments
Thanks! Do you have benches against the current implementation we use, |
Yes, in the Readme there is one comparison https://github.com/pseitz/lz4_flex#lz4_flex, but you can execute the benchmarks yourself with |
Sorry, is the lzzz equivalent to the lz4 crate? Else, I can't find |
Yes lzzz is equivalent to lz4, but exposes more options of the c99 reference implementation |
Here are some numbers for a 10MB dickens book. Compression
Decompression
|
Hey, sorry for the delay on this one. So, for my understanding, the tradeoff here is:
are there other knobs that I am missing? If not, I think it would be cool to at least offer a feature flag switching between both so that users can pick between highest performance vs wasm compatibility. |
These benchmarks are against the safe version. The only knobs are to use the unsafe implementation, which is closer to the cpp implementation, due to removed bounds checks. It's very well fuzzy tested, but still unsafe code. The overall performance is still very high for the safe version, it's likely the bottleneck is elsewhere for most applications. |
+1. I'm trying to write wasm bindings for a parquet decoder (and exploring |
What others think, e.g. @Dandandan , @ritchie46, @danburkert , @jhorstmann , @houqp? |
I am for feature gating this. Would be valuable to have in wasm targets indeed. Regarding the forbid unsafe. I am more for using |
100% agree with both points made by @ritchie46 👍 |
Closed by #124. Thanks @kylebarron and everyone else for the discussions! |
I like your no unsafe approach, the LZ4 implementation of lz4_flex also uses
foorbid(unsafe_code)
with default feature flags. If you switch to it, even more parts of code would be completely safe.
In the Readme I posted some benchmarks, the performance is a little bit slower than the unsafe version, but still decent.
The text was updated successfully, but these errors were encountered: