Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(transformer/arrow-function): create super method binding names lazily #7313

Conversation

overlookmotel
Copy link
Contributor

@overlookmotel overlookmotel commented Nov 16, 2024

Key super getter/setter hash map with original property name &str, instead of generated binding name. This allows a couple of improvements:

  • Generate binding names for super getters/setters lazily, only when they're created, rather than every time you encounter a super.
  • Don't allocate strings into arena which are never used as part of AST. Use CompactString for building those strings instead.

Copy link

graphite-app bot commented Nov 16, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-performance Category - Solution not expected to change functional behavior, only performance labels Nov 16, 2024
Copy link

codspeed-hq bot commented Nov 16, 2024

CodSpeed Performance Report

Merging #7313 will not alter performance

Comparing 11-16-perf_transformer_arrow-function_super_method_binding_names_lazily (e09d2df) with 11-16-refactor_transformer_arrow-functions_use_indexmap_for_super_getter_setters (5d85386)

Summary

✅ 30 untouched benchmarks

@overlookmotel overlookmotel force-pushed the 11-16-perf_transformer_arrow-function_super_method_binding_names_lazily branch from 0cb33fa to 63a68fd Compare November 16, 2024 18:22
@overlookmotel overlookmotel changed the base branch from 11-16-perf_transformer_arrow-function_optimize_generate_super_binding_name_ to 11-16-refactor_transformer_arrow-functions_use_indexmap_for_super_getter_setters November 16, 2024 18:22
@overlookmotel overlookmotel marked this pull request as ready for review November 16, 2024 18:24
@overlookmotel overlookmotel changed the title perf(transformer/arrow-function): super method binding names lazily perf(transformer/arrow-function): create super method binding names lazily Nov 16, 2024
@overlookmotel overlookmotel force-pushed the 11-16-refactor_transformer_arrow-functions_use_indexmap_for_super_getter_setters branch from 4c3f93d to 65bd6a8 Compare November 16, 2024 23:50
@overlookmotel overlookmotel force-pushed the 11-16-perf_transformer_arrow-function_super_method_binding_names_lazily branch from 63a68fd to 94b20ba Compare November 16, 2024 23:51
@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Nov 17, 2024
Copy link
Member

Dunqing commented Nov 17, 2024

Merge activity

@Dunqing Dunqing force-pushed the 11-16-refactor_transformer_arrow-functions_use_indexmap_for_super_getter_setters branch from 65bd6a8 to 6472077 Compare November 17, 2024 05:10
Dunqing pushed a commit that referenced this pull request Nov 17, 2024
…azily (#7313)

Key `super` getter/setter hash map with original property name `&str`, instead of generated binding name. This allows a couple of improvements:

* Generate binding names for `super` getters/setters lazily, only when they're created, rather than every time you encounter a `super`.
* Don't allocate strings into arena which are never used as part of AST. Use `CompactString` for building those strings instead.
@Dunqing Dunqing force-pushed the 11-16-perf_transformer_arrow-function_super_method_binding_names_lazily branch from 94b20ba to f1cd977 Compare November 17, 2024 05:11
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 17, 2024
@overlookmotel overlookmotel force-pushed the 11-16-refactor_transformer_arrow-functions_use_indexmap_for_super_getter_setters branch from 6472077 to 3555cf9 Compare November 17, 2024 10:01
overlookmotel added a commit that referenced this pull request Nov 17, 2024
…azily (#7313)

Key `super` getter/setter hash map with original property name `&str`, instead of generated binding name. This allows a couple of improvements:

* Generate binding names for `super` getters/setters lazily, only when they're created, rather than every time you encounter a `super`.
* Don't allocate strings into arena which are never used as part of AST. Use `CompactString` for building those strings instead.
@overlookmotel overlookmotel force-pushed the 11-16-perf_transformer_arrow-function_super_method_binding_names_lazily branch from f1cd977 to 1821352 Compare November 17, 2024 10:01
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Nov 17, 2024
…azily (#7313)

Key `super` getter/setter hash map with original property name `&str`, instead of generated binding name. This allows a couple of improvements:

* Generate binding names for `super` getters/setters lazily, only when they're created, rather than every time you encounter a `super`.
* Don't allocate strings into arena which are never used as part of AST. Use `CompactString` for building those strings instead.
@overlookmotel overlookmotel force-pushed the 11-16-refactor_transformer_arrow-functions_use_indexmap_for_super_getter_setters branch from 3555cf9 to 5d85386 Compare November 17, 2024 10:10
@overlookmotel overlookmotel force-pushed the 11-16-perf_transformer_arrow-function_super_method_binding_names_lazily branch from 1821352 to e09d2df Compare November 17, 2024 10:10
Base automatically changed from 11-16-refactor_transformer_arrow-functions_use_indexmap_for_super_getter_setters to main November 17, 2024 10:40
@graphite-app graphite-app bot merged commit e09d2df into main Nov 17, 2024
29 checks passed
@graphite-app graphite-app bot deleted the 11-16-perf_transformer_arrow-function_super_method_binding_names_lazily branch November 17, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-merge Merge with Graphite Merge Queue A-transformer Area - Transformer / Transpiler C-performance Category - Solution not expected to change functional behavior, only performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants