Adds capacity hints to both keep and reject slices in Partition
function to prevent repeated allocations during append operations.
Changes:
- keep: make([]T, 0) → make([]T, 0, len(values))
- reject: make([]T, 0) → make([]T, 0, len(values))
Impact:
- Reduces allocations from O(log n) to O(1) for each slice
- Improves performance by eliminating slice growth overhead
- Minimal memory overhead as worst case is original slice size
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>