Repository navigation
Stride aware Fixnum Arrays - #1087
Draft
AlexaCampusano wants to merge 5 commits into
Draft
AlexaCampusano wants to merge 5 commits into
AlexaCampusano wants to merge 5 commits into
Conversation
AlexaCampusano
commented
Oct 21, 2026
AlexaCampusano
force-pushed
the
nc/add-array-element-stride-all-arrays
branch
from
October 21, 2026 19:05
37586b0 to
3bc9d14
Compare
AlexaCampusano
commented
Oct 21, 2026
AlexaCampusano
force-pushed
the
nc/add-array-element-stride-all-arrays
branch
from
October 21, 2026 21:56
3bc9d14 to
7d5b74b
Compare
AlexaCampusano
force-pushed
the
nc/add-array-element-stride-all-arrays
branch
from
October 28, 2026 18:29
1af7cd0 to
e00398f
Compare
AlexaCampusano
force-pushed
the
nc/add-array-element-stride-all-arrays
branch
2 times, most recently
from
November 3, 2026 15:23
c721298 to
7ba849e
Compare
AlexaCampusano
force-pushed
the
nc/add-array-element-stride-all-arrays
branch
from
November 3, 2026 20:10
7ba849e to
03e3015
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related read Storage Strategies for Collectionsin Dynamically Typed Languages
What are we trying to do?
This PR is a proposal to add fixnums stride information into the array object, so heap arrays have more information about the data it's storing and we can optimize it.
Prior Art: #1081
In this PR I'm targetting all fixnum arrays, not just frozen ones. This PR affects these common paths:
duparray. Now it narrows that template if it's all fixnums, and at runtime duparray copies the narrow buffer into a new narrow array instead of handing out a shared view of the template. The literal owns its own (small) buffer, and the template is collected with its iseq. There are concerns I have with this approach, that I'd like to discuss.dup,clone,a[i, n],first(n),last(n),pop(n),replace,sort_by!copy the narrow buffer rather than sharing it, so neither the source nor the copy gets widened by being read from.Some numbers!!!!
More narrowed paths exercised vs the previous #1081 work.
Read paths