]> git.proxmox.com Git - rustc.git/blob - vendor/litemap/README.md
New upstream version 1.67.1+dfsg1
[rustc.git] / vendor / litemap / README.md
1 # litemap [![crates.io](https://img.shields.io/crates/v/litemap)](https://crates.io/crates/litemap)
2
3 ## `litemap`
4
5 `litemap` is a crate providing [`LiteMap`], a highly simplistic "flat" key-value map
6 based off of a single sorted vector.
7
8 The goal of this crate is to provide a map that is good enough for small
9 sizes, and does not carry the binary size impact of [`HashMap`](std::collections::HashMap)
10 or [`BTreeMap`](alloc::collections::BTreeMap).
11
12 If binary size is not a concern, [`std::collections::BTreeMap`] may be a better choice
13 for your use case. It behaves very similarly to [`LiteMap`] for less than 12 elements,
14 and upgrades itself gracefully for larger inputs.
15
16 ### Pluggable Backends
17
18 By default, [`LiteMap`] is backed by a [`Vec`]; however, it can be backed by any appropriate
19 random-access data store, giving that data store a map-like interface. See the [`store`]
20 module for more details.
21
22 [`Vec`]: alloc::vec::Vec
23
24 ## More Information
25
26 For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x).