Skip to main content

Module simd_rolling

Module simd_rolling 

Source
Expand description

SIMD-accelerated rolling window operations

This module provides high-performance rolling window calculations using:

  • Portable SIMD via the wide crate (works on stable Rust)
  • Algorithmic optimizations (deque-based min/max, Welford’s algorithm for std)
  • Smart thresholds to avoid SIMD overhead on small arrays

Functions§

clip
Clip values (auto-selects SIMD or scalar)
diff
Diff operation (auto-selects SIMD or scalar)
pct_change
Percentage change (auto-selects SIMD or scalar)
rolling_max_deque
Deque-based rolling maximum - O(n) amortized complexity
rolling_mean
Rolling mean (auto-selects SIMD or scalar)
rolling_min_deque
Deque-based rolling minimum - O(n) amortized complexity
rolling_std
Rolling std (auto-selects Welford algorithm, always optimal)
rolling_std_welford
Welford’s algorithm for numerically stable rolling standard deviation
rolling_sum
Rolling sum (auto-selects SIMD or scalar)