Skip to content

Performance: SIMD acceleration for hot paths (optional) #39

@enzoftware

Description

@enzoftware

Description

Optimize performance-critical filter operations using SIMD intrinsics where beneficial. This is an optional enhancement for production readiness.

Context

Convolution-based filters (Gaussian, Sobel, Box blur) and pixel-level effects (brightness, contrast, grayscale) are prime candidates for SIMD optimization.

Tasks

  • Profile and identify the top bottleneck operations using criterion benchmarks
  • Evaluate using std::simd (nightly) vs packed_simd2 vs manual intrinsics
  • Implement SIMD versions for the highest-impact operations
  • Maintain scalar fallback for targets without SIMD support
  • Benchmark before/after to quantify improvement

Acceptance Criteria

  • At least 2x speedup on SIMD-optimized operations (measured via benchmarks)
  • Scalar fallback works correctly on all targets
  • No correctness regressions (same output as scalar version)
  • SIMD code is behind feature flags if using nightly features

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions