Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jul 24, 2025

Small optimization. Info::new trim message String in place, rather than creating a new String and dropping the old one.

Why doesn't Rust have String::trim_in_place and String::trim_start_matches_in_place?

@github-actions github-actions bot added the C-performance Category - Solution not expected to change functional behavior, only performance label Jul 24, 2025
Copy link
Member Author

overlookmotel commented Jul 24, 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.

@overlookmotel overlookmotel marked this pull request as ready for review July 24, 2025 17:00
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 24, 2025

CodSpeed Instrumentation Performance Report

Merging #12506 will not alter performance

Comparing 07-24-perf_diagnostics_info_new_trim_string_in_place (ce5d074) with main (85a34ce)1

Summary

✅ 34 untouched benchmarks

Footnotes

  1. No successful run was found on 07-24-refactor_diagnostics_implement_eq_and_ord_for_infoposition_ (5c33fc7) during the generation of this report, so main (85a34ce) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jul 24, 2025
Copy link
Contributor

camc314 commented Jul 24, 2025

Merge activity

Small optimization. `Info::new` trim message `String` in place, rather than creating a new `String` and dropping the old one.

Why doesn't Rust have `String::trim_in_place` and `String::trim_start_matches_in_place`?
@graphite-app graphite-app bot force-pushed the 07-24-refactor_diagnostics_implement_eq_and_ord_for_infoposition_ branch from bc9ddcc to 5c33fc7 Compare July 24, 2025 17:40
@graphite-app graphite-app bot requested a review from camc314 as a code owner July 24, 2025 17:40
@graphite-app graphite-app bot force-pushed the 07-24-perf_diagnostics_info_new_trim_string_in_place branch from 7c1340d to ce5d074 Compare July 24, 2025 17:40
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 24, 2025
Base automatically changed from 07-24-refactor_diagnostics_implement_eq_and_ord_for_infoposition_ to main July 24, 2025 17:48
@graphite-app graphite-app bot merged commit ce5d074 into main Jul 24, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 07-24-perf_diagnostics_info_new_trim_string_in_place branch July 24, 2025 17:48
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.

3 participants