perf(parser): avoid vec clone in parse_heritage_clause#20665
perf(parser): avoid vec clone in parse_heritage_clause#20665graphite-app[bot] merged 1 commit intomainfrom
parse_heritage_clause#20665Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
This PR removes an unnecessary re-allocation when parsing a TypeScript implements clause in class heritage parsing, simplifying the code path and avoiding an extra Vec construction.
Changes:
- Replace
self.ast.vec_from_iter(self.parse_ts_implements_clause())with direct use of the returnedVecfromparse_ts_implements_clause().
Merging this PR will not alter performance
Comparing Footnotes
|
parse_heritage_clause
2d352a9 to
0373c67
Compare
Merge activity
|
note: no perf improvement expected as this path isn't taken in the parser benchmarks
0373c67 to
2b2794b
Compare

note: no perf improvement expected as this path isn't taken in the parser benchmarks