Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 2
    If you mean parsing = enumerating, then both data structures are used for what they were intended in your sample, so probably yes... what is your objective? millions of elements, performance criticality? Commented Jun 5, 2016 at 10:41
  • 1
    "Is this the best data structure that I can use for my case?" Best for what? You haven't explained your case or how you want to use it at all. Commented Jun 5, 2016 at 10:41
  • Let me give an example: each sensor return N values saved in the list; the first pass of my application is reading these values at intervals, save them in a list, and then create the entry in the dictionary; and so on for each sensor. The second pass, call the key, read each value in the list, and replace the lowest value with a new reading from the sensor. This means that I read and write multiple times per each cycle. I do sample 10 times every second, on 40 sensors, so 400 samples per second. Commented Jun 5, 2016 at 10:48
  • From the use scenario looks like the important part in not the Dictionary, but the data structure holding the values per each key. I think the way you formulated the question is misleading and most of the answers will (and do) concentrate on the key lookup part. Commented Jun 5, 2016 at 10:58
  • @IvanStoev correct; I thought that the question was clear, since I am asking if this data structure is performant enough for a scenario where values will be read and written often. Commented Jun 5, 2016 at 11:01