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

perf: make precompiles accept and return Bytes to reduce allocations #1072

Closed
DaniPopes opened this issue Feb 10, 2024 · 0 comments · Fixed by #1085
Closed

perf: make precompiles accept and return Bytes to reduce allocations #1072

DaniPopes opened this issue Feb 10, 2024 · 0 comments · Fixed by #1085
Labels
refactor Refactor of the code

Comments

@DaniPopes
Copy link
Collaborator

DaniPopes commented Feb 10, 2024

Some precompiles (like identity, KZG point evaluation) can avoid allocating completely by re-using the CallInputs::input Bytes structure's allocation, or by returning Bytes::from_static when the return value is statically known at compile time.

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

Successfully merging a pull request may close this issue.

2 participants