-
Notifications
You must be signed in to change notification settings - Fork 156
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
Make compact values more compact #2083
Conversation
f96ac50
to
4360965
Compare
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.
My understanding is that the main change here is
- to the representation of CompactValue to give a short form for Ada-only tokens
- to map token quantities etc to different memory regions (to give a more efficient storage and access pattern)
The implications in terms of memory usage are quite subtle (and maybe architecture dependent?). I would suggest making this explicit in a comment at the start of the file, so that it could be changed in future if required (otherwise, this could take some time to unpick and redo!). I would also include some pointers to any relevant benchmarking.
It presumably also affects the minutxo calculation, so there should be a reference to this from within the file?
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.
Looks good modulo checking that the tests cover situations where we have:
- Duplicate Asset names
- Duplicate policy IDs
-- These represent the index, pid offset, asset name offset, and quantity. | ||
-- If any of the quantities out of bounds, this will produce Nothing. | ||
-- The triples are ordered so that a component with an asset name appearing | ||
-- earlier in the asset name section is first. |
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.
Is this ordering stable? What happens with multiple null asset names, which will share the offset? Can this result in different representations, and do we care?
a62a2e9
to
692a0a4
Compare
03a0bd2
to
0e08843
Compare
0e08843
to
d8f404a
Compare
No description provided.