{"repo":"indexmap-rs/indexmap","free":true,"listed":false,"github":"https://github.com/indexmap-rs/indexmap","clone":"git clone https://github.com/indexmap-rs/indexmap.git","description":"A hash table with consistent order and fast iteration; access items by key or sequence index","language":"Rust","stars":2411,"topics":["rust","hashtable"],"license":"Apache-2.0","category":"dev-tools","readme_excerpt":"indexmap A pure-Rust hash table which preserves (in a limited sense) insertion order. This crate implements compact map and set data-structures, where the iteration order of the keys is independent from their hash or value. It preserves insertion order (except after removals), and it allows lookup of entries by either hash table key or numerical index. Note: this crate was originally released under the name ordermap , but it was renamed to indexmap to better reflect its features. The ordermap crate now exists as a wrapper over indexmap with stronger ordering properties. Background This was inspired by Python 3.6's new dict implementation (which remembers the insertion order and is fast to iterate, and is compact in memory). Some of those features were translated to Rust, and some were not. The result was indexmap, a hash table that has following properties: - Order is independent of hash function and hash values of keys. - Fast to iterate. - Indexed in compact space. - Preserves insertion order as long as you don't call .remove() , .swap remove() , or other methods that explicitly change order. The alternate .shift remove() does preserve relative order. - Uses hashbrown for the inner table, just like Rust's libstd HashMap does. Performance IndexMap derives a couple of performance facts directly from how it is constructed, which is roughly: A raw hash table of key-value indices, and a vector of key-value pairs. - Iteration is very fast since it is on the dense key-values. - Re","default_branch":null,"files":null,"tree":[],"storefront":"/r/indexmap-rs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/indexmap-rs/indexmap/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}