Closed
Conversation
CodSpeed Performance ReportMerging #12099 will improve performances by 6.89%Comparing Summary
Benchmarks breakdown
|
ec946e3 to
6e3c81a
Compare
Contributor
|
Member
Author
|
Closing in favor of #12101 which shows the most promising results. |
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.
One more time. Trying to use
smol_strforIdentifiers to avoid heap allocations for strings shorter than 24 characters.I also expect this to help with
red_knotwhere the symbol table can't store string slices for symbol names. Instead, the symbol table clones the identifier name which isO(1)forsmol_str.Edit: It should be possible to store a
&Namein the symbol table, now that salsa supports the&'dblifetime. That means,O(1)cloning is not as important anymore.Performance improvement
I think the performance improvement mainly comes from the removed
Box<str>toStringconversion in the hotparse_namefunction. It would be possible to remove that conversion by changingExprNameto store aBox<str>.For a comparison, #12100 uses a
Box<str>instead of aSmolStr. The parser improvements are not as significant. But no linter benchmark regress.General observation:
ExprNameidentifierdropNamenow requires branching