perf(semantic): optimize Scoping::rename_symbol method#10612
Merged
Conversation
This was referenced Apr 25, 2025
Member
Author
CodSpeed Instrumentation Performance ReportMerging #10612 will not alter performanceComparing Summary
|
43a0e3a to
1578ef4
Compare
9244388 to
bb70f36
Compare
1578ef4 to
0013165
Compare
bb70f36 to
03a4344
Compare
Contributor
Merge activity
|
0013165 to
e0bab74
Compare
03a4344 to
d6170cd
Compare
d6170cd to
0189d98
Compare
e76a059 to
ac31f1f
Compare
0189d98 to
94b5642
Compare
94b5642 to
b7ef8b1
Compare
b7ef8b1 to
52706e1
Compare
ac31f1f to
c82ef6b
Compare
Boshen
pushed a commit
that referenced
this pull request
Apr 27, 2025
…ing` to `Scoping` (#10611) Part of oxc-project/backlog#163 Prepare #10612. I just found that this method has a `to_string` allocation that can be avoided. However, it needs to combine `set_symbol_name` and `rename_binding`, so move to `Semantic`.
Base automatically changed from
04-25-refactor_traverse_semantic_move_rename_symbol_from_traversescoping_to_scoping
to
main
April 27, 2025 12:48
52706e1 to
cdd25c5
Compare
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.

Optimize
Scoping::rename_symbolto avoid callingto_string, since the borrow checker is getting in the way, so theset_symbol_nameandrename_bindingmethod implementations need to be combined.