You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In DefaultLeaderElector::elect_leader, the binary_search_by is not really helping since we are constructing the cumulative_weights array each time: either we build it once (and then use the bin search, but note that there are other places where we still do a linear scan of the weights), or we can just find the matching index in the for loop above (~leader.rs:139).
The text was updated successfully, but these errors were encountered:
Yep, thank you. I modified election to deduce party index on the go of prefix sums; won't do caching of cumulative_weights since design of the LeaderElector shall not care about Party's state.
In
DefaultLeaderElector::elect_leader
, thebinary_search_by
is not really helping since we are constructing thecumulative_weights
array each time: either we build it once (and then use the bin search, but note that there are other places where we still do a linear scan of the weights), or we can just find the matching index in the for loop above (~leader.rs:139
).The text was updated successfully, but these errors were encountered: