Wsm2110 / Faster.Map

Faster.Map is a high-performance, thread-safe key-value store designed to outperform the standard Dictionary and ConcurrentDictionary
MIT License
75 stars 7 forks source link

More methods #3

Closed frankhommers closed 2 years ago

frankhommers commented 2 years ago

These changes would be a great addition:

Wsm2110 commented 2 years ago

ContainsKey - you could use Emplace() which returns false if the key is used

GetOrThrow - not really sure why you would want to throw, i always hated the fact that dictionaries throw while the key is not found. It returns a default value in which you can decide whether you want to throw or not.

Indexors - will do :)

frankhommers commented 2 years ago

Nice work BTW.

Wsm2110 commented 2 years ago

Get now returns a bool if the key exists which should be a proper replacement for ContainsKey Added indexers which throw if the key hasnt been found