Skip to content

feat(data_structures): add ptr and end_ptr methods to SliceIterExt#13435

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

feat(data_structures): add ptr and end_ptr methods to SliceIterExt#13435
graphite-app[bot] merged 1 commit intomainfrom
08-30-feat_data_structures_add_ptr_and_end_ptr_methods_to_sliceiterext_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Aug 30, 2025

Add ptr and end_ptr methods to SliceIterExt. These methods get pointers to the start and end of slice iterators, using the minimum possible number of instructions (1).

end_ptr also avoids unsafe code, unlike iter.as_slice().as_ptr().add(iter.as_slice().len()), which we used previously.

Use these methods in codegen.

@github-actions github-actions bot added A-codegen Area - Code Generation C-enhancement Category - New feature or request labels Aug 30, 2025
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 #13435 will not alter performance

Comparing 08-30-feat_data_structures_add_ptr_and_end_ptr_methods_to_sliceiterext_ (5b139aa) with main (d8b027f)

Summary

✅ 37 untouched benchmarks

@overlookmotel overlookmotel force-pushed the 08-30-feat_data_structures_add_ptr_and_end_ptr_methods_to_sliceiterext_ branch from 403c732 to 38d92dc Compare August 30, 2025 16:39
@overlookmotel overlookmotel force-pushed the 08-29-feat_data_structures_add_sliceiterext_peek_method branch from 712b35a to e88e35c Compare August 30, 2025 16:39
@overlookmotel overlookmotel marked this pull request as ready for review August 30, 2025 16:41
@overlookmotel overlookmotel force-pushed the 08-29-feat_data_structures_add_sliceiterext_peek_method branch from e88e35c to 2b8108f Compare August 30, 2025 17:31
@overlookmotel overlookmotel force-pushed the 08-30-feat_data_structures_add_ptr_and_end_ptr_methods_to_sliceiterext_ branch from 38d92dc to 1f06e4c Compare August 30, 2025 17:31
@graphite-app graphite-app bot changed the base branch from 08-29-feat_data_structures_add_sliceiterext_peek_method to graphite-base/13435 August 30, 2025 22:12
@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 couldn't merge this PR because it timed out.
  • 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:30 AM UTC: overlookmotel added this pull request to the Graphite merge queue.
  • Aug 31, 12:36 AM UTC: Merged by the Graphite merge queue.

graphite-app bot pushed a commit that referenced this pull request Aug 30, 2025
…xt` (#13435)

Add `ptr` and `end_ptr` methods to `SliceIterExt`. These methods get pointers to the start and end of slice iterators, using the minimum possible number of instructions (1).

`end_ptr` also avoids unsafe code, unlike `iter.as_slice().as_ptr().add(iter.as_slice().len())`, which we used previously.

Use these methods in codegen.
@graphite-app graphite-app bot force-pushed the 08-30-feat_data_structures_add_ptr_and_end_ptr_methods_to_sliceiterext_ branch from 1f06e4c to 26adf36 Compare August 30, 2025 22:33
@graphite-app graphite-app bot changed the base branch from graphite-base/13435 to 08-29-feat_data_structures_add_sliceiterext_peek_method August 30, 2025 22:33
Base automatically changed from 08-29-feat_data_structures_add_sliceiterext_peek_method to main August 30, 2025 22:37
@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_ptr_and_end_ptr_methods_to_sliceiterext_ branch from 26adf36 to 165de00 Compare August 31, 2025 00:25
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Aug 31, 2025
…xt` (#13435)

Add `ptr` and `end_ptr` methods to `SliceIterExt`. These methods get pointers to the start and end of slice iterators, using the minimum possible number of instructions (1).

`end_ptr` also avoids unsafe code, unlike `iter.as_slice().as_ptr().add(iter.as_slice().len())`, which we used previously.

Use these methods in codegen.
@graphite-app graphite-app bot force-pushed the 08-30-feat_data_structures_add_ptr_and_end_ptr_methods_to_sliceiterext_ branch from 165de00 to 5b139aa Compare August 31, 2025 00:31
@graphite-app graphite-app bot merged commit 5b139aa into main Aug 31, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 08-30-feat_data_structures_add_ptr_and_end_ptr_methods_to_sliceiterext_ branch August 31, 2025 00:36
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-codegen Area - Code Generation C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants