Unboxed load/store primitives for string-likes#2906
Merged
Conversation
263f553 to
6f3ebe0
Compare
mshinwell
reviewed
Aug 8, 2024
mshinwell
reviewed
Aug 8, 2024
Collaborator
|
Looks ok in outline, @TheNumbat will review in detail. |
e26aec5 to
e3ec9b4
Compare
Base automatically changed from
dvulakh.prepare-for-unboxed-indexing-primitives
to
main
August 12, 2024 21:13
e3ec9b4 to
a98df86
Compare
index by: int32#,int64#,nativeint# access width: int16,int32,float32,int64,int128,int32#,float32#,int64# for bigstring, string, bytes Signed-off-by: David Vulakh <dvulakh@janestreet.com>
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
9cc1453 to
5a79ac1
Compare
fixes ci Signed-off-by: David Vulakh <dvulakh@janestreet.com>
Contributor
Author
|
I noticed a problem with the code generated by these primitives. For example, This is because the flambda primitives operate on tagged indices, and the untagging doesn't happen until conversion to cmm. I'll post a fix in another PR (edit: #2930); meanwhile I'm reopening review here. |
TheNumbat
approved these changes
Aug 15, 2024
Member
TheNumbat
left a comment
There was a problem hiding this comment.
LGTM, adding the primitives is mostly mechanical after the refactoring, and the tests are quite thorough. I will review the improved codegen PR as well.
lukemaurer
pushed a commit
that referenced
this pull request
Oct 23, 2024
* unboxed access primitives for string-likes
index by: int32#,int64#,nativeint#
access width: int16,int32,float32,int64,int128,int32#,float32#,int64#
for bigstring, string, bytes
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* make fmt
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* remove [CAMLprim] from macro names
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* tweak formatting in [lambda.ml{,i}]
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* improve generated tests
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* better data in generated tests
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* add more tests of edge-case indices
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* reflect float32 -> stable in tests
fixes ci
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
---------
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
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.
Add primitives for:
bigstring,string, andbytesint,int32#,int64#,nativeint#int16,int32,float32,int64,int128(both boxed and unboxed when possible)I add tests of operation over
int128to thesimd/arrays.mltest.tests/typing-layouts/generate_stringlike_indexing.mlgenerates a test (tests/typing-layouts/unboxed_int_stringlike_indexing.ml) that stresses the remaining primitives.