These are chat archives for rust-lang/rust
u64keys with sorted tuple values. I am using a
HashMap<u64, BTreeMap<u32, u64>>right now which is fast but I'm a bit worried about the hashing because I actually don't need it at all for my
u64keys. Whether the
BTreeMapis the right data structure is also questionable. The operation I need to perform is: select 1 to x entries from the map and all entries from inside of it which are
u32key. Any suggestions for an efficient data structure for this kind of work?
BTreeMapbecause I wanted to have it sorted by the
u32. However, this is not required anymore and I now have a
HashMap<u64, (u64, u32)>; you'll notice that the
u64are swapped now.
HashMapresult in a lot of overhead if I'm using
u64only due to hashing? I mean, it hashes that
u64all the time, right?
stdso one would need to implement this in userland?
u64to search is around 20 million entries. Note that
HashMapis super fast already but I would not complain if it's even faster. ;)