# Mojo Deflate vs. C

> Source: <https://kodare.net/2026/10/26/mojo-deflate.html>
> Published: 2026-10-26 06:17:28+00:00

# Mojo deflate vs C

I read Richard Feldman’s post [How close can pure FP get to C?](https://rtfeldman.com/fp-vs-c), and this quote caught my attention:

However, the [article](https://kim-em.github.io/blog/2026-7-24-why-lean-is-faster-than-rust/) also notes that while they managed to surpass Rust’s miniz_oxide, they were no match for the end boss of DEFLATE performance: libdeflate, written in C.

I’ve been playing around with [Mojo](https://mojolang.org/), and I wondered how close to C performance we could get, so I sent Claude on it. Along the way I had Claude build a mutation tester for Mojo that I named [despell](https://github.com/boxed/despell).

All in all, [the Mojo version](https://github.com/boxed/mojo-deflate) managed to beat libdeflate, if only by a narrow margin. Claude found some minor tricks it could employ very easily with Mojo’s `comptime` feature to edge ahead. As Claude also said, this could all be implemented in the C version too, it’s just a bit more cumbersome.
