- Optimized `RelayHealthManager.rankRelays` to use O(M log M) lookup for small subsets instead of O(N) filter.
- Added `byRelay` Map to `_sortedCache` for O(1) access.
- Fixed `NaN` bug in `buildRelayHealthConfig` when `minActiveRelayPool` is undefined.
- Updated `perf/benchmark-lock-ops.mjs` to measure subset performance.
- Added performance report `reports/performance/weekly-perf-report-2026-02-18.md`.
- Achieved ~6.8x speedup in benchmark.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Implement caching for `rankRelays` to avoid redundant sorting and computations.
- Cache is invalidated on new outcomes or when quarantine status changes.
- Add `_metricsVersion` to track metrics updates.
- Benchmarks show ~3x performance improvement (0.06ms -> 0.02ms per call for 100 relays).
- Add unit tests for caching behavior and invalidation.
- Add `perf/benchmark-lock-ops.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>