mstdn.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A general-purpose Mastodon server with a 500 character limit. All languages are welcome.

Administered by:

Server stats:

16K
active users

OSNews

zlib-rs is faster than C

I'm sure we can all have a calm, rational discussion about this, so here it goes: zlib-rs, the Rust re-implementation of the zlib library, is now faster than its C counterparts in both decompression and compression.

We've released version 0.4.2 of zlib-rs, featuring a number of substantial performance improvements. We are now (to our knowledge) the fastest api-compatible

osnews.com/story/141809/zlib-r

www.osnews.comzlib-rs is faster than C – OSnews

@osnews

Does anyone really care about saving a second here or there?

How often are you using this tool anyway?

Certainly, not every second.

@SpaceLifeForm @osnews Running faster also usually translates into using less power, which is important on eg. mobile phones.

@SpaceLifeForm @osnews zlib is pretty frequently used by higher order services for a variety of reasons, it would be easy to see a file host with enough traffic running it hundreds of times per second

@panegyr @osnews

This is a valid argument. But, it does not apply client side.

@SpaceLifeForm @osnews Isn't it used, through gzip, for pretty much all web requests?

@poxviridae @osnews

No disagreement whatsoever.

Compare Windows and Linux on the same box.

@osnews not faster than c, faster than c's zlib compression library there are way faster compressors in c than zlib.

@osnews The #Rust implementation of #zlib is faster because someone is literally investing a quarter million Euros into optimizing it. It has little to do with the language chosen.

@Sturmflut @osnews From your screenshot, there is only 62% of 250'000, so only 155'000. And it's already faster. That's between 1 and 2 ingeneer-years which doesn't seems that much.

@robinm @osnews 2 engineeryears for the re-implementation of a simple, single-purpose library based on decades of knowledge invested by people before you is definitely a lot in my book. The projects they're comparing themselves to definitely didn't see a comparable amount of work in this area.

They need another 95k to finish the work and actually make it available to the Rust ecosystem, BTW. Right now the API is unstable and it's only faster because it uses non-standard LLVM arguments.

@Sturmflut @robinm @osnews that’s a weirdly antagonistic take. It’s not faster because of rust, but probably in spite of it, since they acknowledge some optimisations are harder to achieve in rust than in C.
It is faster not because of the language but because they are putting in the effort, and quite effectively apparently. It’s quite hard to improve something as mature and already optimised as zlib.
Simple, it is not