Skip to content

perf(data_structures): optimize InlineString#10850

Merged
graphite-app[bot] merged 1 commit intomainfrom
05-06-perf_data_structures_optimize_inlinestring_
May 7, 2025
Merged

perf(data_structures): optimize InlineString#10850
graphite-app[bot] merged 1 commit intomainfrom
05-06-perf_data_structures_optimize_inlinestring_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented May 7, 2025

Small optimizations to InlineString.

  1. Make it Copy.
  2. Use an unchecked assertion about length of the string in InlineString::as_str. This provides the compiler with information which may allow it to make optimizations in the caller.

Copy link
Member Author

overlookmotel commented May 7, 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 7, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented May 7, 2025

CodSpeed Instrumentation Performance Report

Merging #10850 will not alter performance

Comparing 05-06-perf_data_structures_optimize_inlinestring_ (2d4b8c9) with main (9ec13f6)

Summary

✅ 36 untouched benchmarks

@overlookmotel
Copy link
Member Author

overlookmotel commented May 7, 2025

Small change, and I think I'm the member of the team who understands InlineString best, so merging without review.

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label May 7, 2025
Copy link
Member Author

overlookmotel commented May 7, 2025

Merge activity

Small optimizations to `InlineString`.

1. Make it `Copy`.
2. Use an unchecked assertion about length of the string in `InlineString::as_str`. This provides the compiler with information which may allow it to make optimizations in the caller.
@graphite-app graphite-app bot force-pushed the 05-06-perf_data_structures_optimize_inlinestring_ branch from 6c514da to 2d4b8c9 Compare May 7, 2025 12:24
@graphite-app graphite-app bot merged commit 2d4b8c9 into main May 7, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 05-06-perf_data_structures_optimize_inlinestring_ branch May 7, 2025 12:31
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label May 7, 2025
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