NightOwl888 commented on code in PR #938: URL: https://github.com/apache/lucenenet/pull/938#discussion_r1713887342
########## src/Lucene.Net/Support/ConcurrentHashSet.cs: ########## @@ -74,9 +74,9 @@ public int Count { AcquireAllLocks(ref acquiredLocks); - for (var i = 0; i < _tables.CountPerLock.Length; i++) + foreach (var t in _tables.CountPerLock) Review Comment: I am not suggesting we spend a lot of time optimizing this. Microsoft has already optimized their collections quite a bit (and this is directly based on ConcurrentDictionary). So, it is usually best to follow their lead. I have had to borrow enough collections to know that they never use foreach. I suspect there are very good reasons for that. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org