wvwwvwwv / scalable-concurrent-containers

High performance containers and utilities for concurrent and asynchronous programming
Apache License 2.0
329 stars 16 forks source link

request: make TreeIndex::range accept Borrowed keys instead of K #158

Closed qthree closed 2 weeks ago

qthree commented 3 weeks ago

BTreeMap in std allows to use Borrowed keys

pub fn range<T, R>(&self, range: R) -> Range<'_, K, V> ⓘ
    where
        T: Ord + ?Sized,
        K: Borrow<T> + Ord,
        R: RangeBounds<T>,

TreeIndex forces usage of K Together with inability to peek K (#157) it's almost impossible to use TreeIndex::range without reallocating keys all the time.

wvwwvwwv commented 3 weeks ago

Good idea, I’ll work on this next week.

qthree commented 3 weeks ago

Good idea, I’ll work on this next week.

Implemented in #159

changgyoopark-db commented 2 weeks ago

=> SCC 2.1.18