Skip to content

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

Open
refcell wants to merge 1 commit intoralexstokes:mainfrom
refcell:refcell/mev-boost-rs-relay-bench
Open

feat(benches): Choose v Shuffle with Benchmark#197
refcell wants to merge 1 commit intoralexstokes:mainfrom
refcell:refcell/mev-boost-rs-relay-bench

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