TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Zlib-Rs Is Not Only Safer but Now Outperforming Zlib C Implementations

63 pointsby mrpotato3 months ago

3 comments

bennettnate53 months ago
Fascinating--I wonder to what extent the performance improvements are due to the better constraints Rust hands over to LLVM for optimization (specifically thinking `noalias` rules) vs aggressiv code optimization by the developers to be to the point where they beat the C zlib. The latter could be more difficult to achieve given how long the original zlib has been getting incrementally improved, though.
评论 #43172587 未加载
评论 #43172788 未加载
giancarlostoro3 months ago
Really interesting, I&#x27;ve never used the Rust version, I can only assume I&#x27;ve used the C implementation indirectly dozens of times if not hundreds, but does anyone know how 1:1 the Rust implementation is?<p>The one area where C will always beat Rust (at least today) will probably always be portability, C compilers run everywhere, on everything, and to anything... Unless Rust has similar capabilities via LLVM?
评论 #43172339 未加载
评论 #43172364 未加载
评论 #43172378 未加载
评论 #43177138 未加载
agentultra3 months ago
Are they exporting their library with the C-ABI? It&#x27;s cool if it&#x27;s fast and would be nice if I could link to it from non-Rust code.
评论 #43172944 未加载