perf: replace O(n²) bubble sort with O(n log n) sort.Slice
Amolith
created
Replace inefficient bubble sort implementation in formatTaskListWithFilter
with Go's standard library sort.Slice for better performance and readability.
- Improves time complexity from O(n²) to O(n log n)
- Reduces code from 7 lines to 3 lines
- Uses idiomatic Go standard library patterns
- Maintains identical sorting behavior (oldest tasks first)
- Passes all linting and static analysis checks