Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/46611/ |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 82abbaa:
|
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
Thanks for going through all these complexity issues.
|
Just in case this isn't already on your radar @JLHwung, I recently noticed something similar in babel/packages/babel-traverse/src/scope/binding.ts Lines 94 to 101 in b281fe3 (Of course, there it's technically an API change so may not be straightforward to just change, but maybe we can add a secondary set to speed up checking for duplicates while still maintaining the array for compatibility.) |
|
@motiz88 Thanks. That's a good catch! A secondary set may introduce consistent issues due to multiple truth. We could provide |
This PR is similar to #13406: We use Set for checking duplicate bindings in parser scope.
Benchmark result (baseline is 7.14.4, current is this PR)
Length-1 let declarations