[Uid] improve base convertion logic#36070
Merged
Merged
[Uid] improve base convertion logic#36070
Conversation
d85653f to
8c79ece
Compare
nicolas-grekas
added a commit
to symfony/polyfill
that referenced
this pull request
Mar 14, 2020
…icolas-grekas) This PR was merged into the 1.15-dev branch. Discussion ---------- [uuid] improve base convertion logic for 32-bit systems Similar to symfony/symfony#36070 Commits ------- 9d449a9 [uuid] improve base convertion logic for 32-bit systems
| * | ||
| * @author Nicolas Grekas <p@tchwork.com> | ||
| */ | ||
| class BinaryUtil |
Member
There was a problem hiding this comment.
Even if it's a utility class, should we add explicit tests for it?
Member
Author
There was a problem hiding this comment.
It's already tested since we use the code in Uuid and Ulid.
If someone whishes to contribute more specific tests, PR welcome.
8c79ece to
7e1cff1
Compare
7e1cff1 to
0e05c6d
Compare
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.
The new logic is at least twice as fast as the current algo.
It's also way more common and generic.