#collection #rand #hash #random

yanked fastutil

Fast utilities and optimizations for Rust

1 unstable release

0.1.0 Dec 17, 2023

#88 in #rand

MIT license

9KB

fastutil-rs

Fast utilities and optimizations for Rust.

fastutil-rs is a convenience crate that wraps around other crates to provide faster, or otherwise useful replacements for common things in Rust, like collections, random number generators, etc.

Features

  • no_std and WASM support
  • 100% safe

Optional Features

  • std uses the Rust standard library to provide collections
  • alloc uses alloc + hashbrown to provide collections
  • hash (default) provides a fast platform-based hashing algorithm
    • gxhash only works on x86-64 and aarch64.
    • Falls back to zwohash on other systems.
  • indexmap (default) provides a HashMap and HashSet that keeps insertion order
  • multimap (std only) provides a HashMap which stores multiple values
  • rand (default) provides minimal RNG implementations from smolcrush
  • serde enables (de)serialization of collections
  • nightly provides nightly-only optimizations
    • likely and unlikely can be wrapped around conditions to help the compiler optimize if statements based on the likelihood of them being true.
    • This also enables nightly optimizations for hashbrown if alloc is being used.

Minimum Supported Rust Version (MSRV)

The current MSRV is 1.63.0.

Dependencies

~1–1.5MB
~24K SLoC