redknightlois / fastdictionary

An alternative implementation of Dictionary<K,V> on C#
MIT License
27 stars 10 forks source link

Remove usage of % modulo operator and replace with the much faster &,… #3

Open mfeemster opened 4 years ago

mfeemster commented 4 years ago

… which will give the same result because the sizes are always a power of two.

Move dictionary creation outside of the performance loops since we're more interested in insertion and retrieval times, rather than creation times.

All tests still run successfully.