From da16d32f1e1adab7e461cd228e5fcecc60e1a41c Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 7 Feb 2026 08:54:04 +0100 Subject: docs: Add Task #67 for DCT/FFT performance benchmarking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds low-priority task to measure and compare DCT/IDCT performance: **Goal:** Quantify performance differences between implementations - Reference O(N²) naive DCT/IDCT - Current FFT-based O(N log N) implementation - Future SIMD-optimized versions (when written) **Location:** test_dct.cc or test_fft.cc **Measurements:** - Average time per transform (microseconds) - Throughput (transforms per second) - Speedup factor vs reference - Multiple test sizes (128, 256, 512, 1024) for scaling analysis **Implementation:** - std::chrono::high_resolution_clock for timing - 1000+ iterations to reduce noise - Min/avg/max statistics - Guarded with !STRIP_ALL for zero production impact **Benefits:** - Validate FFT speedup claims (O(N log N) vs O(N²)) - Quantify SIMD optimization gains when implemented - Detect performance regressions in CI **Priority:** Very Low (informational, not blocking any features) This will be useful when optimizing audio performance in Phase 2. Co-Authored-By: Claude Sonnet 4.5 --- TODO.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/TODO.md b/TODO.md index 5fcad5d..76a2ba0 100644 --- a/TODO.md +++ b/TODO.md @@ -307,6 +307,26 @@ This file tracks prioritized tasks with detailed attack plans. - **Benefits**: Non-programmers can edit tempo, easier iteration, version control friendly - **Priority**: Low (current hardcoded approach works, but less flexible) +- [ ] **Task #67: DCT/FFT Performance Benchmarking**: Add timing measurements to audio tests + - **Goal**: Compare performance of different DCT/IDCT implementations + - **Location**: Add timing code to `test_dct.cc` or `test_fft.cc` + - **Measurements**: + - Reference IDCT/FDCT (naive O(N²) implementation) + - FFT-based DCT/IDCT (current O(N log N) implementation) + - Future x86_64 SIMD-optimized versions (when implemented) + - **Output Format**: + - Average time per transform (microseconds) + - Throughput (transforms per second) + - Speedup factor vs reference implementation + - **Test Sizes**: DCT_SIZE=512 (production), plus 128, 256, 1024 for scaling analysis + - **Implementation**: + - Use `std::chrono::high_resolution_clock` for timing + - Run each test 1000+ iterations to reduce noise + - Report min/avg/max times + - Guard with `#if !defined(STRIP_ALL)` to avoid production overhead + - **Benefits**: Quantify FFT speedup, validate SIMD optimizations, identify regressions + - **Priority**: Very Low (nice-to-have for future optimization work) + ### Developer Tools - [ ] **Task #66: External Asset Loading for Debugging**: mmap() asset files instead of embedded data - **Current**: All assets embedded in `assets_data.cc` (regenerate on every asset change) -- cgit v1.2.3