Lookups


Improve the data retrieval operations for collections.
Overview
lookups is a crate for extending already existing collections (std::vec::Vec, std::collections::HashMap, ...)
with additional lookup functionalities, so you have a faster access to your data as with an iterator or a search algorithm.
This wrapper is just as easy to use as the given (original) collection.
The fast access can be achieved by using different methods, like;
- hash tables
- indexing
- ...
Disadvantage
- it is more memory required. In addition to the user data, data for the hash, index are also stored.
- the write operation are slower, because for every wirte operation is an another one (for storing the lookup data) necessary
How can I use it?
let cars = ;
use ;
// create a new Lookup HashMap: LHashMap with a UniqueIndex
let map = new;
assert!; // conventionally HashMap access with Key (String)
assert!; // lookup with Key (id: usize)
assert_eq!;
assert_eq!;