Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize Name parsing by using a pair of TinyVec
The previous implementation used Rc to represent Label, then composed those in an array to represent Name. That produced a large number of small allocations in the parsing code path. This new implementation avoids allocations entirely for small names, and unless the name has a very large number of labels, it is stored entirely in one allocation. This also removes the Index impl for Name. Since we no longer contain any Labels, we cannot implement that (a common problem with Index leaking implementation details).
- Loading branch information
Showing
7 changed files
with
163 additions
and
109 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.