2 ms·
I agree that Dictionaries and the like are under-used. But I don't agree that LINQ is bad because someone on your team didn't know how to use a Dictionary and
by SideburnsOfDoom 14y ago
I agree that Dictionaries and the like are under-used.
But I don't agree that LINQ is bad because someone on your team didn't know how to use a Dictionary and thought that iteration would be fast on large in-memory lists.
In many cases there are efficient LINQ constructs, e.g lazy lists, and First() not enumerating past the matching item. Hand-coding these is prone to doing it worse than Linq would. Teach your team how to use .ToDictionary() if need be.