Skip to content

Add performance analysis: implementation gaps vs structural limits relative to FFTW - #129

Open
pankgeorg wants to merge 5 commits into
JuliaMath:mainfrom
JuliaComputing:docs/performance-analysis
Open

Add performance analysis: implementation gaps vs structural limits relative to FFTW#129
pankgeorg wants to merge 5 commits into
JuliaMath:mainfrom
JuliaComputing:docs/performance-analysis

Conversation

@pankgeorg

@pankgeorg pankgeorg commented Aug 29, 2026

Copy link
Copy Markdown

A written analysis of why FFTA is slower than FFTW on each size class, separating what is an implementation gap (fixable within the current design) from what is structural (pure-Julia, size-generic recursion, no SIMD codelet library), with a per-class ceiling estimate and a prioritised work list.

It is based on the sweep in #128 (benchmark/REPORT.md, which this document links to — the link resolves once #128 lands) plus targeted experiments: a precomputed-twiddle variant of the O(n²) leaf, a breakdown of the Bluestein and rfft paths, FFTW's actual plan choices on the same sizes, and a small @generated straight-line codelet generator to measure Julia's compile-latency cost for codelets (< 1 s up to 64 points, 1.0–1.6× FFTW).

Short version: no size class is structurally stuck at ≥ 4×; the large gaps (composites with factors 5/7, primes, small ND, 2D rfft) come from twiddles being recomputed per execution, O(n²) leaves without codelets, per-call Bluestein allocation, and the mapslices/full-complex real paths. The structural residue is the last ~1.3–2× on cache-resident sizes (SIMD across butterflies) and the cache-blocked large-n path that FFTW's MEASURE planner finds.

I'll open an issue with the proposed PR sequence so the plan can be discussed before code lands.

Update: a companion run of the suite on an x86-64 (AVX2) machine is now part of #128, and its per-class comparison against the aarch64 run showed that the x86-64 penalty is concentrated on the non-radix-4 kernels (5/7-rich composites up to 3.8× worse relative to FFTW, powers of two only 1.21×), not spread uniformly as a vector-width effect. §5.3a records the data, §5.3 and the ceiling table (§6) are adjusted per class, and radix-5/7 butterflies move up the work list on x86-64.

@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.80%. Comparing base (7aeb327) to head (a5e9900).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #129   +/-   ##
=======================================
  Coverage   98.80%   98.80%           
=======================================
  Files           5        5           
  Lines         585      585           
=======================================
  Hits          578      578           
  Misses          7        7           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant