Crates.io | ordnung |
lib.rs | ordnung |
version | 0.0.1 |
source | src |
created_at | 2020-04-20 17:27:41.142111 |
updated_at | 2020-04-20 21:25:50.943953 |
description | Fast, vector-based map implementation that preserves insertion order. |
homepage | |
repository | https://github.com/maciejhirsz/ordnung |
max_upload_size | |
id | 232281 |
size | 117,784 |
Fast, vector-based map implementation that preserves insertion order.
Vec
for storage, with only
two extra words per entry for book-keeping on 64-bit architectures.O(log n)
in most cases.O(n)
, same as Vec<(K, V)>
.-C target-cpu=native
to take advantage of aHash
.While insertion in Ordnung is getting progressively slower as the size of the
map grows, growing a HashMap
is also getting progressively slower due to
re-bucketing costs.
With preallocated memory, Ordnung is still faster for a small number of entries.
As the size of the map doubles, Ordnung incurs a roughly constant jump in cost
due to its ~O(log n)
nature, however it still remains competitive with fast
HashMap
s.
This code is distributed under the terms of both the MIT license and the Apache License (Version 2.0), choose whatever works for you.
See LICENSE-APACHE and LICENSE-MIT for details.