Repository navigation
Speed up Array extensions - #507
Merged
gusty merged 6 commits intoOct 3, 2022
Merged
Conversation
gusty
reviewed
Oct 3, 2022
| | null -> null | ||
| | [||] -> [||] | ||
| | _ -> | ||
| let candidate = new ResizeArray<'T>() |
Member
There was a problem hiding this comment.
Try ArrayCollector instead, I think it's faster.
gusty
requested changes
Oct 3, 2022
gusty
left a comment
Member
There was a problem hiding this comment.
Excellent !
Looks good to me, just a few details.
Comment on lines
+57
to
+60
| match source with | ||
| | null -> null | ||
| | [||] -> [||] | ||
| | _ -> |
Member
There was a problem hiding this comment.
Maybe we should remove null handling for the moment until we agree on a general strategy.
| oldValueIndexRight <- oldValueIndexRight - 1 | ||
|
|
||
| if matchingElements then | ||
| candidate.AddRange(newValue) |
Member
There was a problem hiding this comment.
Parens around newValue might not be needed.
Same below.
| && source.[sourceIndex + oldValueIndexRight] = oldValue.[oldValueIndexRight] | ||
|
|
||
| while oldValueIndexLeft <= middleIndex | ||
| && oldValueIndexRight >= middleIndex |
Member
There was a problem hiding this comment.
Let's use 4 spaces indent, so add 2 spaces here
fcallejon
marked this pull request as ready for review
October 3, 2022 20:24
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.
No description provided.