feat(allocator): implement CloneIn for Box<[T]>#13505
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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 Instrumentation Performance ReportMerging #13505 will not alter performanceComparing Summary
Footnotes |
a9d10c6 to
f08464f
Compare
d0caa50 to
52d55a0
Compare
52d55a0 to
9efdab4
Compare
f08464f to
c6141ba
Compare
c6141ba to
01600c7
Compare
9efdab4 to
c1fdcf6
Compare
01600c7 to
7d6daa4
Compare
7d6daa4 to
f455da5
Compare
f455da5 to
0c90418
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR implements the CloneIn trait for Box<[T]> to enable efficient arena-allocated cloning of boxed slices. The implementation includes compile-time size and alignment checks to ensure type safety and uses low-level memory operations for optimal performance.
- Adds
CloneInimplementation forBox<[T]>with both standard and semantic ID-preserving clone methods - Includes compile-time assertions to verify size and alignment compatibility between source and target types
- Adds comprehensive test coverage for the new functionality
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Merge activity
|
Implement `CloneIn` for `Box<[T]>`. Use an efficient implementation which doesn't perform any bounds checks. Hopefully, where `T` is `Copy`, compiler will be able to boil this down to a single `memcpy` call. (this stack is mostly leftovers from #13450 which turned out not to be required for that PR, but are still useful for other purposes)
0c90418 to
a54a4de
Compare
Implement `CloneIn` for `Box<[T]>`. Use an efficient implementation which doesn't perform any bounds checks. Hopefully, where `T` is `Copy`, compiler will be able to boil this down to a single `memcpy` call. (this stack is mostly leftovers from #13450 which turned out not to be required for that PR, but are still useful for other purposes)

Implement
CloneInforBox<[T]>. Use an efficient implementation which doesn't perform any bounds checks. Hopefully, whereTisCopy, compiler will be able to boil this down to a singlememcpycall.(this stack is mostly leftovers from #13450 which turned out not to be required for that PR, but are still useful for other purposes)