[Babel 7] Improve generator performance#17642
Merged
nicolo-ribaudo merged 4 commits intobabel:7.xfrom Jan 16, 2026
Merged
Conversation
Collaborator
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/60557 |
541147a to
a2113aa
Compare
|
commit: |
JLHwung
reviewed
Dec 15, 2025
| */ | ||
| function pluginGeneratorOptimization({ types: t }) { | ||
| const generatorNames = []; | ||
| fs.globSync( |
Contributor
There was a problem hiding this comment.
The globSync is not available in Node.js 6. The Babel config will be invoked by Jest to transform unit tests written in ESM.
22e537f to
666738c
Compare
Member
Author
|
Benchmark results compared to v7.26.3. |
666738c to
369cfac
Compare
nicolo-ribaudo
approved these changes
Jan 9, 2026
| @@ -1,10 +0,0 @@ | |||
| import regeneratorDefine from "./regeneratorDefine.js"; | |||
Member
Author
There was a problem hiding this comment.
This is in Babel 7, and we didn't remove it before.
JLHwung
approved these changes
Jan 10, 2026
Contributor
JLHwung
left a comment
There was a problem hiding this comment.
Has this PR been landed to Babel 8? If not could you prepare a new PR for Babel 8?
Member
Author
Not yet, but I will. |
This was referenced Jan 22, 2026
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.
Fixes #1, Fixes #2Close #17627
This resulted in a 20%+ performance improvement vs v7.26.3 and a ~25% performance improvement vs the latest v7 version.
I did the following to improve performance:
charCodeAt.node.typecomparisons.