example.com/path/to/article
000 points · username · 0 hours ago
example.com275 points · 99 comments · 1 day ago · stmonty
jandrewrogers
VorpalWay
lean-zip beats every single compression level miniz_oxide
Miniz_oxide is an intentionally simple implementation. It would be more fair to compare it to the newer zlib-rs[1], which even beats zlib-ng (fastest implementation in C)[2].
[1]: https://lib.rs/crates/zlib-rs
[2]: https://trifectatech.org/blog/zlib-rs-is-faster-than-c/
WalterBright
It's fun trying to reorganize your code to make it pass the `pure` checking.
giovannibonetti
gobdovan
Asking cuz I'm preparing an article on how fast JS can get and found the same thing, you can get in 10% of optimised C-code with basically any code if you torture V8 enough (excepting SIMD where there seems to be a bug in V8 where it doesn't optimise to SIMD even when beyond obvious). Figured out I could extract it in a lib and do it more streamlined but not sure how well manual transforms generalise.
Also, when working on the roc-deflate, did you find recurring transformations that could fit that model or were most improvements specific to compression?
andai
Roc is not a mature language (it's still weeks away from its first numbered release, 0.1.0)
It then links to a video where a consultant mentions using in production (for several years already?), which confused me.
How can you justify using immature technologies for client work? Or is it an extra benefit when it breaks and you have to fix it?
I'm genuinely curious, maybe it's not as bad as I think. But I've used immature hosting platforms, and that certainly didn't go well for me!
michaelteter
uecker
johnny22
amelius
I suspect this will be the best way to delegate things to AI while still staying in driver's seat.
NohatCoder
Without data on compression levels it is hard to make any useful conclusions.
pmkary
jeffbee
eigenblake
cubefox
deadbabe
jdw64
C/C++ code can trivially reach into some remote bit of state and mutate it directly. The compiler rarely objects, no matter how ugly the access method or pattern. It is up to the programmer to make sure the invariants hold and the compiler can’t always see through it. These elided copies add up, though it usually has a maintainability and safety cost.
It is related to why functional languages tend to be mediocre for supercomputing in practice despite having nice properties for massive parallelism in theory.