Skip to content

Fix byte generation in benchmark to avoid invalid byte values #1467

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GarmashAlex
Copy link

Replaced the original binary generation loop in bench/byte_reversal.exs to use rem(i, 256) for each byte value. This ensures that all generated bytes are within the valid range (0..255), preventing runtime errors that occur when trying to create a byte with a value greater than 255. The change allows the benchmark to run correctly for all intended input sizes.

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

Successfully merging this pull request may close these issues.

1 participant