feat: add binary encoding for unboxed types#13
Merged
Conversation
bc89f1e to
1883164
Compare
1883164 to
ec00aca
Compare
This is implicitly true becaues SIMDScalar is limited to scalar types, but this is more precise and resistent to future changes.
ec00aca to
a2661c5
Compare
Contributor
Author
|
Rewritten to include a type encoding in the (now variable sized) header. Might be good to include a hash of the (type) header as well for extra redundancy and/or constant-time header validation, although the current should be non-allocating and realistically fast enough. We can get single-bit flips in the type encoding to another valid type (it is a very small space), but for that to pass validation requires the receiver to also be expecting the corrupted tag, so the silent failure mode is unlikely. |
85c9b51 to
37aef21
Compare
JaapWijnen
reviewed
Jan 13, 2026
JaapWijnen
reviewed
Jan 13, 2026
JaapWijnen
reviewed
Jan 13, 2026
JaapWijnen
approved these changes
Jan 13, 2026
2a3111c to
bd6b932
Compare
This moves the platform dependent sized Int and UInt to the surface layer
This explicitly excludes Box, so we are statically restricted to types we can fully encode in our struct-of-array representation.
bd6b932 to
31455da
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.
Summary
This adds an encoding to
Datafor types that can be represented without pointers. This can be done efficiently by copying the entire underlying buffer in one go.