8000 perf(napi/transform): do not create temp `String` by overlookmotel · Pull Request #10752 · oxc-project/oxc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

perf(napi/transform): do not create temp String #10752

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

Merged

Conversation

overlookmotel
Copy link
Contributor
@overlookmotel overlookmotel commented May 1, 2025

Avoid an allocation. to_string here clones a String and then immediately converts it back to a &str. Avoid that intermediate allocation.

Copy link
Contributor Author
overlookmotel commented May 1, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the C-performance Category - Solution not expected to change functional behavior, only performance label May 1, 2025
@overlookmotel overlookmotel marked this pull request as ready for review May 1, 2025 12:46
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label May 1, 2025
Copy link
graphite-app bot commented May 1, 2025

Merge activity

Avoid an allocation. `to_string` here clones a `String` and then immediately converts it back to a `&str`. Avoid that intermediate allocation.
@graphite-app graphite-app bot force-pushed the 05-01-perf_transformer_inject_global_variables_do_not_search_string_twice branch from 4709038 to 699ab3e Compare May 1, 2025 13:38
@graphite-app graphite-app bot force-pushed the 05-01-perf_napi_transform_do_not_create_temp_string_ branch from 00cb125 to 88249f7 Compare May 1, 2025 13:38
Base automatically changed from 05-01-perf_transformer_inject_global_variables_do_not_search_string_twice to main May 1, 2025 13:44
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label May 1, 2025
@graphite-app graphite-app bot merged commit 88249f7 into main May 1, 2025
15 checks passed
@graphite-app graphite-app bot deleted the 05-01-perf_napi_transform_do_not_create_temp_string_ branch May 1, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

1 participant
0