Skip to content

Conversation

@michaelsproul
Copy link
Member

Proposed Changes

Remove some bounds checks from swap_or_not_shuffle by using the infallible method Hash256::from rather than Hash256::from_slice which does runtime checks and can panic.

This didn't seem to make a difference to the benchmarks, but I think it's a nice cleanup regardless.

@michaelsproul michaelsproul added ready-for-review The code is ready for review code-quality low-hanging-fruit Easy to resolve, get it before someone else does! labels Oct 13, 2024
@michaelsproul
Copy link
Member Author

michaelsproul commented Oct 13, 2024

The swap_or_not_shuffle benchmarks didn't actually compile, so I've fixed the dep issues and made it so that make lint also checks benchmarks.

Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM

@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Oct 14, 2024
@michaelsproul
Copy link
Member Author

@mergify queue

@mergify
Copy link

mergify bot commented Oct 14, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 2e440df

@mergify mergify bot merged commit 2e440df into sigp:unstable Oct 14, 2024
29 checks passed
@michaelsproul michaelsproul deleted the simplify-swap-or-not branch October 17, 2024 04:36
chong-he pushed a commit to chong-he/lighthouse that referenced this pull request Nov 26, 2024
* Simplify hashing in shuffling

* Fix benchmark deps

* Check benchmarks when linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-quality infra-ci low-hanging-fruit Easy to resolve, get it before someone else does! ready-for-merge This PR is ready to merge. test improvement Improve tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants