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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:57:31+00:00 2026-06-14T07:57:31+00:00

I need to store a list of processed network file shares (keeping the full

  • 0

I need to store a list of processed network file shares (keeping the full UNC path) in memory so I do not process these folders again.

I was going to use an array but now I am thinking that a hashtable might be a faster option. I will need to check in a few places if that folder path (string value) exists already.

What what be the fastest (to check for an existence of that value) and less memory consuming option?

  1. Store folder paths in a hashtable with an key=folder path and an empty value
  2. Store folder paths in a one dimensional array
  3. Something else

UPDATE:
I just ran a few tests like in that thread pointed below by generating 50000 strings and doing 3 lookups. I also looked at memory consumption and HashSet is a winner. HashTable is still a good option but Array is the worst one.

Array – 125048 ms to create, 37 ms to lookup, 18Mb in RAM

Hash – 2167 ms to create, 0.74 ms to lookup, 2.4Mb in RAM

HashSet – 1966 ms to create, 0.02 ms to lookup, 1.4Mb in RAM

  • 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-06-14T07:57:32+00:00Added an answer on June 14, 2026 at 7:57 am

    A hastable is preferable over an array in this situation as you are going to be querying for the keys after populating it and the number of items is relatively large. I would start with a hashtable. If the performance is not suitable, then try something else, like utilizing .net’s Dictionary(T,V) or .net 3.5+’s HashSet(T)

    Also, here is a link that will be of interest to you:

    Powershell 2 and .NET: Optimize for extremely large hash tables?

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

Sidebar

Related Questions

I am a beginner in C++. I need to store list of addresses that
I have a need to store an ordered list of strings and am trying
I'm trying to store a List as a DynamoDB attribute but I need to
I have a list of users in local store that I need to update
I need to gather a list of distinct employees from an XML file that
I have a list of objects which I need to store in a dictionary.
I need to pass a List of my objects between activities. I do not
I need to do some pattern matching to process a list of questions and
I need store just 10 arrays in my app, which I can change from
I have id values for products that I need store. Right now they are

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.