https://github.com/alkis/superslice-rs
Extensions for ordered Rust slices.
https://github.com/alkis/superslice-rs
binary-search lower-bounds ordered rust-lang rust-language rust-library slice upper-bounds
Last synced: 3 months ago
JSON representation
Extensions for ordered Rust slices.
- Host: GitHub
- URL: https://github.com/alkis/superslice-rs
- Owner: alkis
- License: apache-2.0
- Created: 2017-11-06T23:09:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-08-27T09:33:31.000Z (almost 2 years ago)
- Last Synced: 2025-04-08T13:04:54.890Z (3 months ago)
- Topics: binary-search, lower-bounds, ordered, rust-lang, rust-language, rust-library, slice, upper-bounds
- Language: Rust
- Size: 22.5 KB
- Stars: 26
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This crate provides extensions for [`slice`](https://doc.rust-lang.org/stable/std/primitive.slice.html)s.
[](https://travis-ci.org/alkis/superslice-rs)
[](https://crates.io/crates/superslice)Licensed under APACHE-2.
### Documentation
https://docs.rs/superslice
### Installation
This crate works with Cargo and is on
[crates.io](https://crates.io/crates/ordslice). Add it to your `Cargo.toml`:```toml
[dependencies]
superslice = "1"
```and augment `slice`s by using its `Ext` trait:
```rust
extern crate superslice;use superslice::*;
```Now you can enjoy high performance of common algorithms on slices:
- `lower_bound`
- `upper_bound`
- `equal_range`### Why isn't this part of the standard library?
Worry not, work is on the way:
- [X] Make `binary_search` as fast as ~~`fast_binary_search`~~: https://github.com/rust-lang/rust/pull/45333
- [ ] Add `lower_bound`, `upper_bound`, `equal_range` to std: https://github.com/rust-lang/rfcs/issues/2184