can any body guide me weather i use a name/value .NET Collection or a .NET name/value Dictionary for best performance? What is the best approach please? My application is ASP.NET, WCF/WF Web Application. There should be a range of 10 to 30 entries per collection. I also will need users to potentially change a couple entries at tim
With that number it won't matter. It's just plain micro-optimisation.
Performance of what? Insertion? Removal? Adding (at end)? Query? The performance of each depends on the operation. However, for 10-30 you'll be lucky to see any difference, so go with whichever describes your situation most clearly and is most convenience.
If you need the best performance: profile. At those numbers you might find that simply looping over an array/list checking for a match is the quickest approach. But this is the least friendly approach - so only even consider that if this is used in the middle of a tight loop that doesn't already have more significant overheads.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With