Skip to main content

has_high_byte_view_key_collision_rate

Function has_high_byte_view_key_collision_rate 

Source
fn has_high_byte_view_key_collision_rate<T: ByteViewType>(
    array: &GenericByteViewArray<T>,
) -> bool
Expand description

Estimates whether cached byte-view keys collide often enough to make the key-based ranking path unattractive. Caching a wider key usually avoids repeated backing-buffer reads for long views. If sampled keys collide frequently, resolving full values plus the extra key comparison can be slower than comparing slices directly, so the caller falls back to that path. The bounded two-window sample keeps this check inexpensive.