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

feat(benches): Choose v Shuffle with Benchmark #197

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

Conversation

refcell
Copy link

@refcell refcell commented Nov 11, 2023

Description

Optimizes mev-boost-rs bid selection to use the O(1) rand::seq::SliceRandom::choose() over the O(n) rand::seq::SliceRandom::shuffle().

Benchmark included with improved time shown below.

Screenshot 2023-11-11 at 7 24 49 AM

Copy link
Owner

@ralexstokes ralexstokes left a comment

Choose a reason for hiding this comment

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

this is great! I would request to remove the formatting changes, but do like the benchmark and love the use of a better shuffle

are you available to iterate on this further? otherwise I may pick out the benchmark and algo swap stuff

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.

2 participants