Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Of course there are exceptions, types such as [ReadOnly]Span use struct enumerators that don't implement interfaces, so the JIT can inline calls and generate code that is identical to a version using plain for-loops. List and many other collections also use struct enumerators, but they may also have safety checks which makes them slightly slower compared to the for-loop (related issue).
Finally, it's probably worth getting familiar with profilers (VS's builtin is fine) and tools such as benchmark.net and sharplab.io.
Finally, it's probably worth getting familiar with profilers (VS's builtin is fine) and tools such as benchmark.net and sharplab.io.