Skip to content
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

refactor: change the native type for account IDs to reduce allocations #600

Open
tomyrd opened this issue Dec 26, 2024 · 1 comment
Open

Comments

@tomyrd
Copy link
Collaborator

tomyrd commented Dec 26, 2024

One general comment: we frequently use account.to_bytes() to convert account ID to a vector of bytes. This results in allocations and I wonder if it would be better to use something like u128 or [u8; 15] as a "native" type for account ID.

Originally posted by @bobbinth in #591 (comment)

@tomyrd
Copy link
Collaborator Author

tomyrd commented Dec 27, 2024

With the changes in #603 the number of allocations is reduced greatly. Would this be enough or we still want to change the native type in the node? The miden-base type has its benefits as it has additional methods that could be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant