measure and speed up 2nd half of generate_index (#18503)
* add metrics and speedup storage calcs in generate_index * add tests, refactor * rename map variable * rename another index variable
This commit is contained in:
committed by
GitHub
parent
0f8bcf65af
commit
da9fdd785c
@@ -593,7 +593,7 @@ pub trait ZeroLamport {
|
||||
fn is_zero_lamport(&self) -> bool;
|
||||
}
|
||||
|
||||
fn get_bin_pubkey(pubkey: &Pubkey) -> usize {
|
||||
pub(crate) fn get_bin_pubkey(pubkey: &Pubkey) -> usize {
|
||||
let byte_of_pubkey_to_bin = 0; // TODO: this should not be 0. For now it needs to be due to requests for in-order pubkeys
|
||||
(pubkey.as_ref()[byte_of_pubkey_to_bin] as usize) * BINS / ((u8::MAX as usize) + 1)
|
||||
}
|
||||
|
Reference in New Issue
Block a user