What Weft is for, and where it loses
Its kernels were 5% slower than mine, and the pipeline built from them was faster anyway. Also the places it lost.
3 Sept 2026 · Updated 2 Oct 2026 · 4 min · Ernest
Compilers & SIMD, Negative results, CorrectnessWeft started as a bet. I thought the speed was less inside any one kernel than in how a group of kernels gets laid out, fused and scheduled for one particular machine, and that a compiler making those decisions from real measurements could beat what I'd pin down by hand.
The first result looked like I'd lost. The kernels Weft generated were about 5% slower than the NEON I'd written myself, and they still are. Then I timed the whole pipeline, a codec-shaped chain of stages: 9.19 µs a frame for Weft's version against 9.98 µs for mine. Weft passes data between stages without copying and overlaps them wherever the dependencies allow, and no single-kernel benchmark sees any of that.
Eight percent isn't dramatic. What stuck with me was where it came from: I'd been carefully optimising the part of the program that was already fine.
Every output Weft produces is checked bit for bit against a slow scalar reference. If a plan can't be verified, it doesn't compile. It's written in C# on .NET 10, which is not where people usually go for this.
Nobody told the planner the answer
The bigger test was SAM 3's 32-block vision tower, run as one graph. With eight workers it went from 77.0 s to 15.6 s. The best schedule I could find by hand gave 5.11×. The planner got 4.93×, or 96.5% of that, and it was only ever given measurements, never the answer.
Where it has no measurement at all, it says Unknown rather than guessing.
Where it lost
On GPU, Weft's generated CUDA matrix multiply ran between 4.7× and 39× behind cuBLAS. It's bit-exact against Weft's own reference, so it's correct, and slow.
On x64, SAM 3 came out 3.75× behind ggml, but the report gives the ratio without the host, thread count or build flags for either side. I lost. I just can't tell you exactly by how much.
And the one time I tried a Weft kernel inside Kiln, my H.264 encoder, it measured 0.99× to 1.02×. A range that straddles 1.00 is a coin toss, so it never merged.
Two of those losses are single kernels, which is bad for my ego and annoyingly consistent with the bet, since inside a kernel is exactly where I said the win wouldn't be.