join: optimize locale collation performance with hybrid comparison#10393
Open
sylvestre wants to merge 2 commits intouutils:mainfrom
Open
join: optimize locale collation performance with hybrid comparison#10393sylvestre wants to merge 2 commits intouutils:mainfrom
sylvestre wants to merge 2 commits intouutils:mainfrom
Conversation
|
GNU testsuite comparison: |
Collaborator
|
Were you expecting the results of this change to show up here? #10391 |
ChrisDryden
reviewed
Jan 21, 2026
| } | ||
|
|
||
| // If both are pure ASCII, byte comparison is sufficient for most locales | ||
| if left.is_ascii() && right.is_ascii() { |
Collaborator
There was a problem hiding this comment.
I think this is not a valid assumption:
Heres a one liner that shows that for punctuation byte order does not always equal collation order. Its part of the reason the test was changed in this pr I think
echo -e "ab:d 1\nabc:d 2" | LC_ALL=en_US.UTF-8 join --check-order - <(echo -e "ab:d x\nabc:d y")
Contributor
Author
yeah, i am confused why it isn't detected |
Performance improvements: - 5.18x faster than upstream locale collation - 35% faster than GNU join for Unicode data - Maintains full locale collation correctness
|
GNU testsuite comparison: |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Performance improvements: