Roc's Pure-Functional DEFLATE Lands 2.6 to 8.9 Percent Behind C's libdeflate
Software / news
Roc's Pure-Functional DEFLATE Lands 2.6 to 8.9 Percent Behind C's libdeflate
Richard Feldman's own 144-benchmark run on two machines found a worst case of about 18 percent slower and a best case of just over 18 percent faster, before Roc has a numbered release.

A pure-Roc DEFLATE package ran a median 8.9 percent slower than the C library libdeflate on an AMD Ryzen 9 3900X and 2.6 percent slower on an M1 MacBook Pro, according to a benchmark post published Oct. 22 by Roc contributor Richard Feldman.
The figures are the author's own, from a run he describes himself, and no independent party is named as having reproduced them.
What was measured
Feldman optimized roc-deflate, a package written entirely in Roc by Niclas Ahden, and compared it with libdeflate, an MIT-licensed C library for whole-buffer DEFLATE, zlib and gzip compression. The libdeflate README lists compression levels 1 to 12, with the upper levels adding an optimal-parsing algorithm, and says it picks optimized code at run time through CPU feature detection.
The test set was 144 benchmarks: 12 files from the Silesia corpus across levels 1 to 12, non-streaming APIs only. Feldman said the outputs from the two libraries were identical.
- Ryzen 9 3900X8.9 %
- M1 MacBook Pro2.6 %
Source: Richard Feldman, How close can pure FP get to C?, Oct. 22, 2026
The spread is wide. The worst case was about 18 percent slower than libdeflate, and the best was slightly over 18 percent faster. One chart in the post, level 1 on the nci file over 15 runs, gives libdeflate 601.03 MB/s and roc-deflate 529.49 MB/s. A seven-run chart on the same level and file gives 387.30 MB/s for libdeflate and 428.60 MB/s for roc-deflate, which puts Roc ahead.
That second pair is why the median matters more than any single bar. The post's text does not tie each chart to a machine, so the two level-1 pairs are best read as an example of the swing, not as a result for either CPU.
The guarantees Roc keeps
Roc is a functional language with automatic memory management and bounds checks. Feldman wrote that "C's performance ceiling is higher than Roc's," and argued the guarantees justify the cost: memory safety, purity, no foreign function interface, and deterministic behavior across targets.
The techniques he lists are plain: avoiding unnecessary sharing of values, hoisting bounds checks out of loops, building lookup tables at compile time and using wrapping arithmetic.
He also cautions that the result may not generalize, since this is the most optimization effort any Roc package has received so far.
A numbered release is weeks away
Roc has not shipped a numbered release. Feldman wrote that 0.1.0 is "weeks away" and that the compiler is a new implementation with a nascent package ecosystem.
His earlier article, which the post summarizes, found that the Lean 4 package lean-zip beat Rust's miniz_oxide at every level, running 15 percent faster at its fastest setting with output 8.8 percent smaller.
Other software-desk benchmark stories on the site include the Postgres recovery_prefetch write stall and Cloudflare's own numbers on its security-audit skill. The date to watch is the Roc 0.1.0 release, which Feldman has not given.
Sources
More in Software
- 01Tencent's LoopForge Installs With Docker Socket Access and Listens on All InterfacesThe MIT-licensed coding-agent workspace has 1.6k stars, ten supported agent CLIs, and a security section its quick-start does not lead with.
- 02Plannotator, at 11.9k Stars, Reviews Agent Plans Locally but Has No Release-Check Opt-OutThe browser review tool for ten coding agents installs with a curl-to-bash script and puts small shares in an unencrypted URL fragment.
- 03Jiff 1.0 Freezes Its API, Putting a Rust Datetime Library Beside ChronoThe release post commits to the 1.0 interface indefinitely and names uv, Cargo, Starship and Nushell among the projects already using it.
- 04Chrome DevTools MCP Gives Agents 63 Tools and Sends Usage Statistics by DefaultThe repository's own README, not the launch post, is where the data-collection default and the opt-out flags are written down.