News: 0001529953

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Rust-Written Zlib-rs Is Not Only Safer But Now Outperforming Zlib C Implementations

([Programming] 5 Hours Ago zlib-rs)


Zlib-rs as a Rust programming language implementation of the Zlib file format for better safety is now beginning to outperform the C implementations of the widely-used Zlib.

Zlib-rs 0.4.2 was released last week and notes in the [1]release announcement :

"Lots of performance improvements. We're now substantially faster than other implementations for inflate (decompression), and faster in the most important cases for compression."

The Trifecta Tech Foundation that develops Zlib-rs also put out a lengthy blog post today that outlines the performance improvements over Zlib C implementations, including both zlib-ng and the Chromium zlib implementation.

Some takeaways from that blog post entitled " [2]zlib-rs is faster than C ":

"As far as we know, we're the fastest api-compatible zlib implementation today for decompression. Not only do we beat zlib-ng by a fair margin, we're also faster than the implementation used in chromium.

...

We're now significantly faster than zlib-ng for all but the smallest chunk size. A chunk size of 2^4 = 16 bytes is very unlikely to be relevant for performance in practice because the input can just be buffered and then decompressed in larger chunks.

We are however significantly faster than zlib-ng at the more relevant chunk sizes: well over 10% for inputs of 1kb, and over 6% for inputs of 65kb.

...

For decompression, the zlib implementation used in the chromium project (found here, which we use via a modified version of libz-sys) is often faster than zlib-ng. However, we also beat it at this benchmark for the most relevant chunk sizes.

We've been chipping away at compression too (shoutout to Brian Pane, who contributed numerous PRs in this area), but see more mixed results."

Some impressive results and promising outlook for Zlib-rs while continuing to retain Zlib API compatibility. The project is hoping to raise €95k in funding to complete additional performance and packaging work.



[1] https://github.com/trifectatechfoundation/zlib-rs/releases/tag/v0.4.2

[2] https://trifectatech.org/blog/zlib-rs-is-faster-than-c/



amxfonseca

[email protected]

Anux

Sethox

ultimA

Spajdrex

wyrd

ultimA

Anux

Strange things are done to be number one
In selling the computer The Druids were entrepreneurs,
IBM has their strategem And they built a granite box
Which steadily grows acuter, It tracked the moon, warned of monsoons,
And Honeywell competes like Hell, And forecast the equinox
But the story's missing link Their price was right, their future
Is the system old at Stonemenge sold bright,
By the firm of Druids, Inc. The prototype was sold;
From Stonehenge site their bits and byte
Would ship for Celtic gold.
The movers came to crate the frame;
It weighed a million ton!
The traffic folk thought it a joke The man spoke true, and thus to you
(the wagon wheels just spun); A warning from the ages;
"They'll nay sell that," the foreman Your stock will slip if you can't ship
spat, What's in your brochure's pages.
"Just leave the wild weeds grow; See if it sells without the bells
"It's Druid-kind, over-designed, And strings that ring and quiver;
"And belly up they'll go." Druid repute went down the chute
Because they couldn't deliver.
-- Edward C. McManus, "The Computer at Stonehenge"