New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AVM: Add box_splice and box_resize opcodes #5750
Conversation
8395c2c
to
1f5c248
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5750 +/- ##
==========================================
+ Coverage 55.86% 55.91% +0.05%
==========================================
Files 477 477
Lines 67259 67333 +74
==========================================
+ Hits 37576 37652 +76
+ Misses 27133 27127 -6
- Partials 2550 2554 +4 ☔ View full report in Codecov by Sentry. |
Big fan of this! Working with a 16KB box for the Exa shuffle was a bit of a pain, having to iterate 4KB chunks and do careful arithmetic. Doable, but tedious and kind of unnecessary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes and tests look good to me, just one small docs question
These opcodes simplify working with large boxes. There are simple combinations of existing codes to do the equivalent on boxes smaller than 4k. But they require moving box content into AVM values that cannot exceed 4k. So, for big boxes it is useful to have these operations. (box_splice may also be a nice convenience, even for small boxes)
These opcodes simplify working with large boxes. There are simple combinations of existing codes to do the equivalent on boxes smaller than 4k. But they require moving box content into AVM values that cannot exceed 4k. So, for big boxes it is useful to have these operations.
Both opcodes seem convenient, but not quite necessary, for smaller boxes.