Skip to content

perf(allocator): Allocator::from_raw_parts get offset of chunk footer field as const#12080

Merged
graphite-app[bot] merged 1 commit intomainfrom
07-04-perf_allocator_allocator_from_raw_parts_get_offset_of_chunk_footer_field_as_const
Jul 4, 2025
Merged

perf(allocator): Allocator::from_raw_parts get offset of chunk footer field as const#12080
graphite-app[bot] merged 1 commit intomainfrom
07-04-perf_allocator_allocator_from_raw_parts_get_offset_of_chunk_footer_field_as_const

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jul 4, 2025

Allocator::from_raw_parts manually amends bumpalo::Bump to inject a manually-created allocator chunk. To do this it needs to locate the current_chunk_footer field of Bump. Remove some unnecessary assertions, which allows compiler to const fold the whole process down to a static integer.

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


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 4, 2025 16:17
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 4, 2025

CodSpeed Instrumentation Performance Report

Merging #12080 will not alter performance

Comparing 07-04-perf_allocator_allocator_from_raw_parts_get_offset_of_chunk_footer_field_as_const (d732e85) with main (1108a5c)

Summary

✅ 38 untouched benchmarks

@overlookmotel overlookmotel force-pushed the 07-04-perf_allocator_allocator_from_raw_parts_get_offset_of_chunk_footer_field_as_const branch from d78fe44 to 404c2ec Compare July 4, 2025 16:26
@overlookmotel
Copy link
Member Author

I don't think anyone else is really across this jiggery-pokery, so merging without review.

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

overlookmotel commented Jul 4, 2025

Merge activity

…er field as const (#12080)

`Allocator::from_raw_parts` manually amends `bumpalo::Bump` to inject a manually-created allocator chunk. To do this it needs to locate the `current_chunk_footer` field of `Bump`. Remove some unnecessary assertions, which allows compiler to const fold the whole process down to a static integer.
@graphite-app graphite-app bot force-pushed the 07-04-perf_allocator_allocator_from_raw_parts_get_offset_of_chunk_footer_field_as_const branch from 404c2ec to d732e85 Compare July 4, 2025 16:35
@graphite-app graphite-app bot merged commit d732e85 into main Jul 4, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 07-04-perf_allocator_allocator_from_raw_parts_get_offset_of_chunk_footer_field_as_const branch July 4, 2025 16:43
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 4, 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.

2 participants