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 6593299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:39:53+00:00 2026-05-25T17:39:53+00:00

What will be the fastest way to access an element from a collection? I

  • 0

What will be the fastest way to access an element from a collection?

I am thinking should be in the order (low to high):

Indexing an Array <= indexing a collection/list <= use key on Dictionary

But I am not sure…

1) Is indexing an array has same speed as indexing a list?

2) And will the indexing speed will grows as the size of the array/list grows?

From my understanding… indexing array should kind of using a pointer to point to the index of the element, which is caculated by the element size. So it should has same speed as indexing collection/list?

From what I know if we use Dictionary to look for a value, the speed of getting a value will grows as the size of Dictionary grows.

3) I just wonder what will be the fastest way to access an element from a collection?

Have been wondering for long time is my assumption is correct 🙂

Thanks

  • 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-25T17:39:54+00:00Added an answer on May 25, 2026 at 5:39 pm

    In C# a List is backed by an array, so both an array and a list/collection can access elements by indexing in O(1) time. Performance for a Dictionary is similar because it is backed by a hash table. However, it should be noted that the performance of access on a hash table is relative to the quality of the hash function and the number of collisions which occur in a particular data set. In C#, each type may override GetHashCode(), which will determine the hash function and thus the performance of accessing such an object within a particular set of such objects in a dictionary.

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

Sidebar

Related Questions

What's the best and fastest way to access a value from the previous iteration
im wanting to know the fastest way to access my globals... they will only
What is the fastest way to create a hash function which will be used
I'm looking for the fastest way to find all strings in a collection starting
What is the fastest way to solve the following I will to join several
What is the fastest way to get column of pixels from bitmap? I don't
Simple question, what's the fastest way of copying an array of doubles in Java.
When improving database performance, What is the fastest way? should I go straight to
What is the fastest way to sum up an array in JavaScript? A quick
What's the fastest way in Ruby to get the first enumerable element for which

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.