Re:New Features in C# 7.0
by tigershark on Friday March 10, 2017 @10:54PM
(#13844126)
Never used a concurrent dictionary or an IDictionary trying to be sanely efficient using TryGetValue instead of ContainsKey followed by a call to the accessor?
I can't really believe that you started using c# from the day one and you never encountered an hot code path with a TryGetValue.
Of course it gets much worse when you have millions of objects, but even with hundred of thousands it is kind of noticeable.
Unless you don't care about caching at all, but that is a complete different kind of dragons'lair...
[ Parent
| on HN ]
There are no comments on this comment yet.