Repository navigation
Conversation
Collaborator
Author
|
Investigating this more, we are making a quite fundamental tradeoff here beyond that already enumerated - by writing to the output buffer in rust, we are not allowing the python to call the rust asynchronously (basically smashing up the stack the lifetime problem that motivated the doubling of memory in the first place). |
Collaborator
|
One interesting thing I learned about safety is that numpy doesn’t actually make guarantees against data races – so any memory shared with numpy can not be converted into a rust reference (read or write), but can be written through with raw pointers ( |
This branch has not been deployed
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.
This is a vibe-coded solution to #44 (comment) - instead of writing directly into the shared output buffer within the async tasks (which AFAICT is impossible), we just use double the memory. This is what zarrs does anyway internally. I will hopefully have time to clean this up at some point. Definitely open to high-level points, but not sure there is much point in code review now. This is more of a PoC