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 SetBytes not allocate errors in non-fast path #599

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

gbotrel
Copy link
Collaborator

@gbotrel gbotrel commented Jan 11, 2025

Description

Noticed a minor issue when benchmark memory allocations in some gnark-crypto upstream code; calling many SetBytes() that are larger than modulus, would result in bigEndian.Element calling errors.New(...) and allocating new error objects at each call. Not needed obviously.

@gbotrel gbotrel requested review from Tabaie and yelhousni January 11, 2025 03:34
@gbotrel gbotrel merged commit 5e3e49f into master Jan 14, 2025
5 checks passed
@gbotrel gbotrel deleted the perf/errstatic branch January 14, 2025 14:59
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

Successfully merging this pull request may close these issues.

1 participant