Skip to content

Comments

perf(transformer/arrow-functions): move arguments transform checks to aid inlining#7322

Merged
graphite-app[bot] merged 1 commit intomainfrom
11-17-perf_transformer_arrow-functions_move_arguments_transform_checks_to_aid_inlining
Nov 17, 2024
Merged

perf(transformer/arrow-functions): move arguments transform checks to aid inlining#7322
graphite-app[bot] merged 1 commit intomainfrom
11-17-perf_transformer_arrow-functions_move_arguments_transform_checks_to_aid_inlining

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Nov 17, 2024

Move the cheap "does arguments need to be transformed" checks introduced in #7321 into enter_identifier_reference and enter_binding_identifier, and mark those methods #[inline]. These hot paths can then usually execute without a function call.

This wins back the other half of the perf hit of #7234.

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 17, 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 17, 2024

CodSpeed Performance Report

Merging #7322 will improve performances by 10.12%

Comparing 11-17-perf_transformer_arrow-functions_move_arguments_transform_checks_to_aid_inlining (44fd962) with main (ea08c1f)

Summary

⚡ 3 improvements
✅ 27 untouched benchmarks

Benchmarks breakdown

Benchmark main 11-17-perf_transformer_arrow-functions_move_arguments_transform_checks_to_aid_inlining Change
transformer[antd.js] 48.6 ms 45.6 ms +6.6%
transformer[checker.ts] 20 ms 18.2 ms +10.12%
transformer[pdf.mjs] 7 ms 6.6 ms +6.03%

@overlookmotel overlookmotel force-pushed the 11-17-perf_transformer_arrow-functions_move_arguments_transform_checks_to_aid_inlining branch 2 times, most recently from bf461b3 to 3ef4e1d Compare November 17, 2024 02:38
@overlookmotel overlookmotel marked this pull request as ready for review November 17, 2024 02:47
@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

  • Nov 17, 12:04 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 17, 12:05 AM EST: A user added this pull request to the Graphite merge queue.
  • Nov 17, 12:15 AM EST: The Graphite merge queue removed this pull request due to downstack failures on PR #7310.
  • Nov 17, 12:16 AM EST: The Graphite merge queue removed this pull request due to downstack failures on PR #7310.
  • Nov 17, 5:03 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 17, 5:32 AM EST: A user added this pull request to the Graphite merge queue.
  • Nov 17, 6:00 AM EST: A user merged this pull request with the Graphite merge queue.

@Dunqing Dunqing force-pushed the 11-17-perf_transformer_arrow-functions_store_state_of_whether_arguments_needs_transform branch from f54762c to 02f345e Compare November 17, 2024 05:13
Dunqing pushed a commit that referenced this pull request Nov 17, 2024
… aid inlining (#7322)

Move the cheap "does arguments need to be transformed" checks introduced in #7321 into `enter_identifier_reference` and `enter_binding_identifier`, and mark those methods `#[inline]`. These hot paths can then usually execute without a function call.

This wins back the other half of the perf hit of #7234.
@Dunqing Dunqing force-pushed the 11-17-perf_transformer_arrow-functions_move_arguments_transform_checks_to_aid_inlining branch from 3ef4e1d to 5b867c4 Compare November 17, 2024 05:13
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 17, 2024
@overlookmotel overlookmotel force-pushed the 11-17-perf_transformer_arrow-functions_store_state_of_whether_arguments_needs_transform branch from 02f345e to 1ac362d Compare November 17, 2024 10:02
@overlookmotel overlookmotel force-pushed the 11-17-perf_transformer_arrow-functions_move_arguments_transform_checks_to_aid_inlining branch from 5b867c4 to d4e09b8 Compare November 17, 2024 10:02
overlookmotel added a commit that referenced this pull request Nov 17, 2024
… aid inlining (#7322)

Move the cheap "does arguments need to be transformed" checks introduced in #7321 into `enter_identifier_reference` and `enter_binding_identifier`, and mark those methods `#[inline]`. These hot paths can then usually execute without a function call.

This wins back the other half of the perf hit of #7234.
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Nov 17, 2024
@overlookmotel overlookmotel force-pushed the 11-17-perf_transformer_arrow-functions_store_state_of_whether_arguments_needs_transform branch from 1ac362d to 905d8b8 Compare November 17, 2024 10:11
overlookmotel added a commit that referenced this pull request Nov 17, 2024
… aid inlining (#7322)

Move the cheap "does arguments need to be transformed" checks introduced in #7321 into `enter_identifier_reference` and `enter_binding_identifier`, and mark those methods `#[inline]`. These hot paths can then usually execute without a function call.

This wins back the other half of the perf hit of #7234.
@overlookmotel overlookmotel force-pushed the 11-17-perf_transformer_arrow-functions_move_arguments_transform_checks_to_aid_inlining branch from d4e09b8 to 22c8d05 Compare November 17, 2024 10:11
… aid inlining (#7322)

Move the cheap "does arguments need to be transformed" checks introduced in #7321 into `enter_identifier_reference` and `enter_binding_identifier`, and mark those methods `#[inline]`. These hot paths can then usually execute without a function call.

This wins back the other half of the perf hit of #7234.
@overlookmotel overlookmotel force-pushed the 11-17-perf_transformer_arrow-functions_store_state_of_whether_arguments_needs_transform branch from 905d8b8 to 26d3e96 Compare November 17, 2024 10:49
@overlookmotel overlookmotel force-pushed the 11-17-perf_transformer_arrow-functions_move_arguments_transform_checks_to_aid_inlining branch from 22c8d05 to 44fd962 Compare November 17, 2024 10:49
Base automatically changed from 11-17-perf_transformer_arrow-functions_store_state_of_whether_arguments_needs_transform to main November 17, 2024 10:56
@graphite-app graphite-app bot merged commit 44fd962 into main Nov 17, 2024
@graphite-app graphite-app bot deleted the 11-17-perf_transformer_arrow-functions_move_arguments_transform_checks_to_aid_inlining branch November 17, 2024 11:00
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