Claude Code builds an FFT library that beats FFTW in most tests

Guided by one expert, a coding agent built a fast Fourier transform library in about 60 hours of active work. On most measured cases it outran FFTW and the vendor libraries. The author's record of the work shows which part the human still had to play.

7 min readIIIOpen sourcePreprint, not peer reviewed
Save
Figure 2 from the paper "Faster than the West: agentic engineering of a portable fast Fourier transform"
FFTL's speed relative to the fastest rival across transform sizes, separating tuned sizes, sizes drawn after release and awkward lengths, which shows its weaker spots on the NVIDIA graphics chip. Figure 2 from Tobias Knopp, 2026, arXiv:2612.00427. CC BY 4.0.

What the study shows

The fast Fourier transform, or FFT, is the routine that turns a signal into its frequencies. It sits inside audio processing, medical imaging and physics simulations. For more than two decades the reference library has been FFTW, the 'Fastest Fourier Transform in the West'. Chip makers add their own libraries, such as NVIDIA's cuFFT and Apple's vDSP.

Tobias Knopp, a researcher in Fourier methods at the University of Lübeck, asked Claude Code, Anthropic's coding agent, to build a rival from an empty folder. His opening rules were three: a permissive MIT licence, no reading of FFTW's source code, and the goal of being faster than FFTW. The result, called FFTL, was written in the Julia programming language. It took about 60 hours of active work across 7 days up to public release.

One package runs on ARM and x86 processors, on Apple and NVIDIA graphics chips, and as a C library with FFTW's interface. That means programs written for FFTW can switch to it without changes. It also offers cosine and sine transforms on graphics chips, which cuFFT and Apple's library lack.

The author measured version 0.2.0, released 9 days later with 8 contributions from outside developers. Each test case was compared with the fastest other library on the same machine. On the two processors, an Apple M1 Max and an AMD EPYC server chip, FFTL won 76 to 85% of cases. On the Apple graphics chip it won 73%. On an NVIDIA RTX A6000 it was level with VkFFT, a widely used open-source GPU library: ahead in double precision, behind in single precision.

To answer the worry that FFTL was tuned to its own test set, the author drew new sizes at random after release. On the processors these did about as well as the tuned sizes. On the graphics chips they did worse, which the author says shows the GPU tuning rules generalise less well. Accuracy held up: errors stayed within a few rounding steps of the most precise result.

The author kept every message, tool call and code change. The agent designed the architecture, found most performance gaps through its own benchmarks, and closed or narrowed 28 of 34 gaps against rival libraries. The author's most common message type was checking: asking why a case was slow or questioning a claim. Choosing what to compare against was rare, but the author reports that these few choices decided where the agent spent its effort. Model use up to release would have cost about 450 to 500 US dollars at list prices.

Figure 4 from the paper "Faster than the West: agentic engineering of a portable fast Fourier transform"
Each performance gap the agent recorded against a rival library, before and after its fix, alongside which checks caught slowdowns and which rival exposed each gap. Figure 4 from Tobias Knopp, 2026, arXiv:2612.00427. CC BY 4.0.

Our reading

In our reading, the striking result is less the speed than the record of how it happened. One episode stands out. A weakness in the GPU code sat untouched for 30 hours because no rival library in the test set offered those transforms. Once the author added VkFFT, which does, the agent started work on it 4 minutes later. The agent chased whatever the benchmark showed. It rarely looked beyond it.

The same pattern returned after release. Outside developers found lengths that FFTL handled at about two thirds of the best speed, a kind of size missing from the author's test set. The fix came the same day. Finding the gap took someone outside. This fits the author's own conclusion: the comparison set acted as the real specification.

On readiness, we place FFTL at level III, open source available. It has a systematic benchmark with public raw data, and the code is released under the MIT licence and registered as a Julia package. It is not yet at level IV: no named organisation documents using it in production.

Free membership

Read the rest of this story

Membership is free. You get every article in full, and can save stories and follow topics.

We send a sign-in link, no password needed. Already a member? Sign in

Readiness assessment

III
Open source
LevelStatusEvidence
I  Lab onlyMetA working library is described and was measured on four hardware platforms.
II  BenchmarkedMetThere is a systematic benchmark against FFTW, ducc0, vDSP, cuFFT, VkFFT and MPSGraph, with held-out sizes. The raw results are public on Zenodo, though this is the author's own harness, not a standard community benchmark.
III  Open sourceMetThe code is released under the MIT licence at github.com/JuliaMath/FFTL.jl, with v0.2.0 archived on Zenodo. The package is registered in Julia's General registry.
IV  In productionNot yetThere is no documented production use by a named organisation. NFFT.jl uses it on an unreleased main branch, and outside contributors appeared within days, but neither counts as production use.

What would move it up
Documented production use by a named organisation, for example a released NFFT.jl version or an imaging pipeline using FFTL. Independent benchmarks on other hardware would add confidence.

The study

Tobias Knopp. Faster than the West: agentic engineering of a portable fast Fourier transform. arXiv, 30 November 2026. arXiv:2612.00427

Preprint, not peer reviewed · Licence CC BY 4.0 · University of Lübeck, Lübeck

Badge for this study

Notes

  1. Knopp, T. Faster than the West: agentic engineering of a portable fast Fourier transform. arXiv preprint 2612.00427, not peer reviewed. Source
  2. FFTL.jl source code, MIT licence. The version measured is v0.2.0 (commit 1efbaf1), archived at Zenodo, doi:10.5281/zenodo.24430375. Source
  3. Raw benchmark results, gap ledgers and analysis scripts, Zenodo doi:10.5281/zenodo.24697573. Source
  4. Headline figures: share of cases faster than the fastest other library was 85% (M1 Max, 1 thread), 82% (M1 Max, 8 threads), 76% (EPYC 7763, 1 and 16 threads), 73% (M1 Max GPU) and 45% (RTX A6000). Median speed-ups were 1.27, 1.29, 1.26, 1.29, 1.34 and 0.97 times respectively. Against VkFFT on the A6000: median 0.99 times overall, 1.20 in double and 0.91 in single precision.
  5. Held-out sizes, cases won (held-out against tuned): 89% against 82% (M1, 1 thread), 76% against 77% (EPYC, 1 thread), 63% against 80% (M1 Max GPU), 34% against 49% (A6000).
  6. Readiness: level III, open source available. Evidence: MIT-licensed code, registered Julia package, public raw benchmark data. Level IV not met: no documented production use by a named organisation.

Edited and signed by

Stefan PerdalFounder. Twenty-five years of building digital products.234 stories edited

Stefan read the study, set the readiness level and approved this story. An AI system found the paper and wrote the first draft.

How this was made

An AI model read the study and wrote this article in the structure Science Underway uses. An editor reviewed it and approved it for publication. Check the original study before you rely on the details.

No corrections to this article. Found an error? Report it.

More on Code