-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Add MemoryExtensions.Min/Max #128306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add MemoryExtensions.Min/Max #128306
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
baff8f3
Add MemoryExtensions.Min/Max
manandre 6ef9e87
Add specific exception message when span is empty
manandre a1023cc
Reject null comparer
manandre d214de8
Update documentation
manandre f5107bd
Remove cache file
manandre 93c617a
Apply Copilot suggestions
manandre b4fb827
Align implementation on enumerable logic
manandre 8d32597
Add fast paths
manandre 69566d1
Add tests for integer types
manandre c2c8dfa
Add tests for NaN case
manandre 55b1cf7
Small fixes
manandre 0acc339
Reduce code duplication
manandre 9c71813
Add test
manandre 9835263
Move new code to a dedicated file
manandre 9193d7e
Rework span cast for integer fast-path
manandre 6d34978
Small fix
manandre 9172c33
Cleanup
manandre b9d0ba1
Remove the duplicate logic in System.Linq
manandre 6182e81
Extra cleanup
manandre bd6d541
Add extra tests
manandre 2eabf0e
Another improvement for System.Linq
manandre e04c30e
Reduce comparer checks
manandre cc58f4a
More improvement for System.Linq
manandre 906f624
Refactor IMinMaxDirection implementation for improved clarity and per…
manandre 3073acc
Fix char type handling in MinMaxInteger methods for correct comparisons
manandre a4e042c
Remove cache file
manandre 0367a7f
Update documentation for comparer parameter in MinMax methods to clar…
manandre 6118075
Fix loop initialization in IMinMaxDirection for correct span iteration
manandre bd9c3b6
Reorder Max and Min methods for ReadOnlySpan<T> in MemoryExtensions
manandre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.