Skip to content
NewA calmer, faster ZeroHour
Otherinfo

Roc DEFLATE library runs within single digits of C libdeflate

Original title: How close can pure functional programming get to C?

Hacker News · AIby stmonty ()8 min read
AI summary · x-ai/grok-4.7Summaries by Vani AI

On the Silesia corpus, roc-deflate was a median 8.9% slower on Ryzen and 2.6% slower on an M1.

Richard Feldman reports optimizing roc-deflate, a pure Roc DEFLATE package, against libdeflate in C. Across 144 Silesia-corpus benchmarks it was slower on average, with a median gap of 8.9% on a Ryzen 3900X and 2.6% on a 2021 M1 MacBook Pro. Worst cases were about 18% slower and some inputs more than 18% faster. Roc 0.1.0 is still weeks away, and the post says the result may not generalize.

Unconfirmed: The author says it is unknown whether other Roc packages can match this result.

Key facts
  • lean-zip in Lean 4 beat miniz_oxide but not libdeflate.
  • roc-deflate has no streaming API yet and was checked for identical output.
  • Roc cannot opt out of memory safety, bounds checks, or reference counting.
  • The post mentions a Brotli remote code execution found the day before, without a CVE id.
Analyze this story with Vani AIImpact, who is affected and what defenders should do, in a new chat

From the original article

8 min read at rtfeldman.com

In Why Lean is Faster Than Rust , the author shares an impressive result: a DEFLATE compression library written in Lean 4 , a functional programming language and proof assistant, outperforming an equivalent Rust package that crates. io says has been downloaded over a billion times. From the article: lean-zip beats every single compression level miniz_oxide provides, i.

Hacker News · AI

By stmonty · rtfeldman.com

Read the full article at Hacker News · AI

A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.