superslice-rs
superslice-rs copied to clipboard
Extensions for ordered Rust slices.
This crate provides extensions for slices.
Licensed under APACHE-2.
Documentation
https://docs.rs/superslice
Installation
This crate works with Cargo and is on
crates.io. Add it to your Cargo.toml:
[dependencies]
superslice = "1"
and augment slices by using its Ext trait:
extern crate superslice;
use superslice::*;
Now you can enjoy high performance of common algorithms on slices:
lower_boundupper_boundequal_range
Why isn't this part of the standard library?
Worry not, work is on the way:
- [X] Make
binary_searchas fast as ~~fast_binary_search~~: https://github.com/rust-lang/rust/pull/45333 - [ ] Add
lower_bound,upper_bound,equal_rangeto std: https://github.com/rust-lang/rfcs/issues/2184