© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
21 replies
ero

Fast look-up algorithms

I'm looking to use a sort of cache of objects which are stored each with a unique key.
Currently, I do this simply using a
Dictionary<TKey, TValue>
Dictionary<TKey, TValue>
. This is to prevent having to fetch the items anew, when I can simply get them from that cache.

My question is, what are some quicker and more efficient collections or algorithms to use for storing pairs of keys and values and fetching them when needed? (Obviously the logic to "refresh" the cache will run when an item cannot be found.)
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

vectorizable algorithms/excercises
C#CC# / help
2y ago
Debugging recursive algorithms
C#CC# / help
4y ago
data structures and algorithms course
C#CC# / help
2y ago
❔ Weird performance behavior with sorting algorithms.
C#CC# / help
3y ago