Skip to content

perf(data_structures): reduce IterMut::advance_unchecked to 1 instruction#13438

Merged
graphite-app[bot] merged 1 commit intomainfrom
08-30-perf_data_structures_reduce_itermut_advance_unchecked_to_1_instruction
Aug 31, 2025
Merged

perf(data_structures): reduce IterMut::advance_unchecked to 1 instruction#13438
graphite-app[bot] merged 1 commit intomainfrom
08-30-perf_data_structures_reduce_itermut_advance_unchecked_to_1_instruction

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Aug 30, 2025

Use as_mut_slice method (introduced in #13437) to optimize advance_unchecked method on slice::IterMut. Previously it had a branch, now it's only 1 instruction.

Copy link
Member Author

overlookmotel commented Aug 30, 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 30, 2025

CodSpeed Instrumentation Performance Report

Merging #13438 will not alter performance

Comparing 08-30-perf_data_structures_reduce_itermut_advance_unchecked_to_1_instruction (475205f) with main (5b139aa)1

Summary

✅ 37 untouched benchmarks

Footnotes

  1. No successful run was found on 08-30-feat_data_structures_add_as_mut_slice_method_to_itermut_via_sliceitermutext_trait (d0479e9) during the generation of this report, so main (5b139aa) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@overlookmotel overlookmotel force-pushed the 08-30-feat_data_structures_add_as_mut_slice_method_to_itermut_via_sliceitermutext_trait branch from 6347cd3 to 8c391ee Compare August 30, 2025 17:31
@overlookmotel overlookmotel force-pushed the 08-30-perf_data_structures_reduce_itermut_advance_unchecked_to_1_instruction branch from 361cd34 to b7c88ce Compare August 30, 2025 17:31
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Aug 30, 2025
Copy link
Member Author

overlookmotel commented Aug 30, 2025

Merge activity

  • Aug 30, 10:12 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Aug 30, 10:33 PM UTC: overlookmotel added this pull request to the Graphite merge queue.
  • Aug 30, 11:08 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #13435.
  • Aug 31, 12:26 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Aug 31, 12:37 AM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #13437.
  • Aug 31, 12:37 AM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #13437.
  • Aug 31, 12:46 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Aug 31, 12:51 AM UTC: overlookmotel added this pull request to the Graphite merge queue.
  • Aug 31, 12:52 AM UTC: Merged by the Graphite merge queue.

@graphite-app graphite-app bot force-pushed the 08-30-feat_data_structures_add_as_mut_slice_method_to_itermut_via_sliceitermutext_trait branch from 8c391ee to 02e8ba3 Compare August 30, 2025 22:34
graphite-app bot pushed a commit that referenced this pull request Aug 30, 2025
…uction (#13438)

Use `as_mut_slice` method (introduced in #13437) to optimize `advance_unchecked` method on `slice::IterMut`. Previously it had a branch, now it's only 1 instruction.
@graphite-app graphite-app bot force-pushed the 08-30-perf_data_structures_reduce_itermut_advance_unchecked_to_1_instruction branch from b7c88ce to e2940ef Compare August 30, 2025 22:34
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 30, 2025
@overlookmotel overlookmotel force-pushed the 08-30-feat_data_structures_add_as_mut_slice_method_to_itermut_via_sliceitermutext_trait branch from 02e8ba3 to 6e4eb47 Compare August 31, 2025 00:25
@overlookmotel overlookmotel force-pushed the 08-30-perf_data_structures_reduce_itermut_advance_unchecked_to_1_instruction branch from e2940ef to 5661ccd Compare August 31, 2025 00:25
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Aug 31, 2025
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 31, 2025
…uction (#13438)

Use `as_mut_slice` method (introduced in #13437) to optimize `advance_unchecked` method on `slice::IterMut`. Previously it had a branch, now it's only 1 instruction.
@overlookmotel overlookmotel force-pushed the 08-30-perf_data_structures_reduce_itermut_advance_unchecked_to_1_instruction branch from 5661ccd to 475205f Compare August 31, 2025 00:46
@overlookmotel overlookmotel force-pushed the 08-30-feat_data_structures_add_as_mut_slice_method_to_itermut_via_sliceitermutext_trait branch from 6e4eb47 to d0479e9 Compare August 31, 2025 00:46
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Aug 31, 2025
Base automatically changed from 08-30-feat_data_structures_add_as_mut_slice_method_to_itermut_via_sliceitermutext_trait to main August 31, 2025 00:51
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 31, 2025
@graphite-app graphite-app bot merged commit 475205f into main Aug 31, 2025
32 of 51 checks passed
@graphite-app graphite-app bot deleted the 08-30-perf_data_structures_reduce_itermut_advance_unchecked_to_1_instruction branch August 31, 2025 00:52
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.

2 participants