3 releases (breaking)
Uses old Rust 2015
0.3.0 | Feb 9, 2018 |
---|---|
0.2.0 | Dec 1, 2017 |
0.1.0 | Nov 7, 2017 |
#2402 in Algorithms
1,395 downloads per month
Used in nb2nl
16KB
188 lines
This crate provides extensions for ordered slice
s.
Licensed under APACHE-2.
Deprecated
This crate is deprecated and replaced by superslice.
Documentation
Installation
This crate works with Cargo and is on
crates.io. Add it to your Cargo.toml
:
[dependencies]
ordslice = "1"
and augment slice
s by using its Ext
trait:
extern crate ordslice;
use ordslice::Ext;
Now you can enjoy super fast lower_bound
, upper_bound
, and equal_range
.
Why isn't this part of the standard library?
Worry not, work is on the way:
- Make
binary_search
as fast as: https://github.com/rust-lang/rust/pull/45333fast_binary_search
- Add
lower_bound
,upper_bound
,equal_range
to std: https://github.com/rust-lang/rfcs/issues/2184