Quote Originally Posted by peterst View Post
Compile and run it in Release mode and you will see better results.
Some of the optimisations added to .Net 7 and .Net 8 are getting almost unbelievable. Things like Dynamic PGO and On-Stack Replacement can make such a difference when compiled in release mode. Given how much bad press LinQ gets in terms of performance it is quite refreshing to see some of the fastest entries even using LinQ as part of the solution.