wt-slice 0.1.0

High-performance ordered-slice search extensions
Documentation
  • Coverage
  • 86.96%
    20 out of 23 items documented15 out of 21 items with examples
  • Size
  • Source code size: 47.48 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 291.97 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • pathscale/wt-slice
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • pathscale

wt-slice

High-performance extensions for ordered slices.

This is a fork of superslice. It preserves superslice's lower-bound, upper-bound, equal-range, and permutation APIs while adding exact-search experiments for WorkTablesIndex.

Licensed under APACHE-2.

Installation

Until the fork is published, use its Git repository:

[dependencies]
wt-slice = { git = "https://github.com/pathscale/wt-slice" }

and augment slices by using its Ext trait:

use wt_slice::*;

Now you can enjoy high performance of common algorithms on slices:

  • exact_search
  • exact_search_by
  • exact_search_by_key
  • lower_bound
  • upper_bound
  • equal_range

The exact-search methods return Result<matching_index, insertion_index>. Their search loop exits early on equality while using unpredictable conditional selection for the left/right decision, avoiding the most expensive branch in a conventional binary search.

Why isn't this part of the standard library?

Worry not, work is on the way: