11 ms·
It's true, but 95% of the cases you get much better results by using the right data structures (dictionaries) instead of transforming queries to loops. Still is
by olmo 10y ago
It's true, but 95% of the cases you get much better results by using the right data structures (dictionaries) instead of transforming queries to loops. Still is a very cool thing, hopefully is standardized into Roslyn
- platz 10y agoHow would the provided example be better realized as a dictionary?
- SideburnsOfDoom 10y agoAll true, but the example is a demo that doesn't do anything useful, and not typical code.
- jsingleton 10y agoUsing the best structure is a good idea but simple LINQ is very readable if performance isn't a big concern. BTW I cover this in my recent book: https://www.packtpub.com/mapt/book/Application%20Development/9781785881893/6 https://www.packtpub.com/mapt/book/Application%20Development... You could try code samples and benchmarks: https://github.com/PacktPublishing/ASP.NET-Core-1.0-High-Performance/tree/master/Chapter%206 https://github.com/PacktPublishing/ASP.NET-Core-1.0-High-Per...