At least 5x faster alternative of HashMap,
for very small maps. It is also faster than
FxHashMap,
ArrayMap. The smaller the map, the higher the
performance. When the map is larger than 50, it is better to use standard
HashMap.
WELCOME: Not all functions that a user expects to have in a map are implemented. I will appreciate if you contribute by implementing these missing functions.
Here is how you use it:
use Map;
let mut m : = new;
m.insert;
m.insert;
assert_eq!;
Pay attention, here the map is created with an extra generic argument 10. This is
the total size of the map, which is allocated on stack when ::new() is called.
Unlike HashMap, the Map doesn't use heap at all.
Read the API documentation. Important to notice
that signatures of some functions are different from HashMap, for example remove() and
insert() expect arguments to be passes by-value instead of by-reference.
How to Contribute
First, install Rust and then:
If everything goes well, fork repository, make changes, send us a pull request.
We will review your changes and apply them to the master branch shortly,
provided they don't violate our quality standards. To avoid frustration,
before sending us your pull request please run cargo test again. Also,
run cargo fmt and cargo clippy.