Skip to content

Precompute segments offsets and use them as segment's identity (#15509)#15656

Merged
normanmaurer merged 1 commit into
4.1from
seg
Sep 15, 2025
Merged

Precompute segments offsets and use them as segment's identity (#15509)#15656
normanmaurer merged 1 commit into
4.1from
seg

Conversation

@normanmaurer

Copy link
Copy Markdown
Member

Motivation:

Reusing a segment perform a data-dependent multiply to obtain the recycled segment's starting index slowing down segment's allocation

Modifications:

Store in the segments free-list the precomputed offsets, performing just a lookup

Result:

Faster segment's allocation

Motivation:

Reusing a segment perform a data-dependent multiply to obtain the
recycled segment's starting index slowing down segment's allocation

Modifications:

Store in the segments free-list the precomputed offsets, performing just
a lookup

Result:

Faster segment's allocation

Co-authored-by: Chris Vest <christianvest_hansen@apple.com>
@normanmaurer normanmaurer added this to the 4.1.128.Final milestone Sep 15, 2025
@normanmaurer

Copy link
Copy Markdown
Member Author

Backporting some changes to the allocator

@normanmaurer normanmaurer merged commit 8bf87c8 into 4.1 Sep 15, 2025
17 checks passed
@normanmaurer normanmaurer deleted the seg branch September 15, 2025 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants