Idiomatic Koru Kernels Match Hand-Specialized C

April 6, 2026
Man working on a laptop analyzing business data and financial graphs indoors.
Photo by www.kaboompics.com on Pexels

Benchmarks and the surprise

It has been reported that the Koru language team ran an n‑body kernel benchmark and found their idiomatic, fused Koru kernel faster than straightforward C, Zig, and Rust reference implementations — without any hand-tuning or -ffast-math. The published numbers put Koru at 1.00, plain C and Zig around 1.14, and Rust about 1.17, with Lisp and Haskell variants trailing further behind. Short version: code written in Koru’s kernel style landed in the same ballpark as competent idiomatic C — and in those runs, a little ahead.

The follow‑up: hand‑specialized C closes the gap

Not satisfied with a single data point, the authors allegedly rewrote the hot loop as a fixed‑size, scalarized C version that mirrors what a compiler expects after aggressive specialization. It has been reported that when compiled both with and without -ffast-math, the hand-specialized C matched or slightly beat the fused Koru kernel (both roughly 1.00). So was Koru magic? No. Was the result surprising? Absolutely. It shows the original gap could be eliminated, but only by forcing the C author to write a very particular shape of code — the kind of thing an optimizer would otherwise have to infer.

Why this matters

The key claim — and the emotional punch of the story — is not “Koru beats C.” It is that idiomatic Koru kernel code appears to carry enough semantic information for a compiler to lower it into near‑optimal machine code without asking the programmer to play part‑time optimizer. That’s the takeaway: expressiveness without the surgical hand‑tuning. Caveats: the team notes the numbers are ballpark (thermal state, scheduler, runs vary) and all sources are on GitHub for scrutiny. Want to know if language design should care? This is a data point that says: yes — give the compiler the right semantics, and you don’t always need to reach for assembler-like tricks.

Sources: korulang.org, Hacker News