-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid creating empty vectors in vector.Apply (#5540)
vector.Apply can create a large number of empty (zero-length) vectors through calls to vector.rip, generating substantial garbage. Fix that by changing rip to return nil instead of a slice of empty vectors, changing Apply to skip the recursive call when it sees a nil from rip and substitute a nil vector in place of the skipped call's result, and changing NewTagMap to tolerate nil vectors so NewDynamic will as well.
- Loading branch information
Showing
2 changed files
with
17 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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 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