Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6338459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:26:56+00:00 2026-05-24T19:26:56+00:00

This question may have been asked in different formats, but for my current requirement

  • 0

This question may have been asked in different formats, but for my current requirement can someone suggest which is the best..

In ASP.Net i have my own implementation of local & global resources, I’m storing the key value pair in static Dictionary object, Totally there may be a maximum of 10,000 values (all pages). When asp.net application loads a page it stores the value in my static dictionary object. When the page is visited again instead of reading the value from resource file it is served from static Dictionary object.

My question is for performance reason Dictionary is the best or should i go with SortedList/ SortedDictionary

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T19:26:57+00:00Added an answer on May 24, 2026 at 7:26 pm

    Sorting adds overhead, so if you don’t need sorting, you’re just looking up a single page from the dictionary based on key, then I would stick with the Dictionary.

    From you scenario, I assume lookup speed is the most important concern.

    SortedDictionary uses a red-black tree, a binary tree that keeps the collection ordered whenever an item is added/deleted. So if you’re looking for ranges of values, where the location of one item in the collection relative to another item is important, then SortedDictionary makes sense. Where you might need to access the collection using an index (like an array) instead of the key, SortedList makes sense.

    Dictionary uses a hash table to hash and store the keys, which it uses for lookups, so it makes looking up a random, single item very fast. This matches your scenario.

    SortedDictionary operates on the order of O(log n) for add/lookup, where Dictionary operates on O(1) for add/lookup.

    See a comparison of the System.Collections.Generic collections.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question may have been asked already - but unfortunately, I could not find
This question may have been asked before, but I had trouble finding an answer,
This question may have been asked before, but I couldn't find an answer to
This may have been already asked but I can't seem to find this specific
This question may well have been asked before but I didn't find anything whilst
I realize that this question may have been asked several times in the past,
This question have been asked by several people but my problem seems to be
I know, variations of this question had been asked before. But my case may
This question may have been asked before and I'm sorry if I missed it,
This may be a bit of a nooby question, I have been trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.