General Performance Tip: Type Conversion

This article explores type conversion in programming, comparing the traditional syntax with the newer "as" keyword in .NET. While the "as" keyword improves code readability, benchmark results suggest that the conventional method is slightly more performant, advising developers to stick with traditional type conversion unless significant performance improvements are observed with the "as" keyword.

Code It Any Way You Want: Optimizing Span Operations – Clear vs. Fill

This article compares two key search methods in dictionaries: using `Contains()` on the Keys collection and `ContainsKey()` method directly on the dictionary. It demonstrates examples for both approaches, highlighting Microsoft's recommendation of using `ContainsKey()`. The article suggests further examination of the performance aspect of these methods.

Collection Performance: Is LINQ Always the Most Performant Choice?

The article explores the performance implications of using LINQ for collection queries, finding that a conventional foreach() loop outperforms LINQ by 1.75 times in identifying items matching a given query. The conclusion suggests benchmarking to determine the optimal approach based on the nature of the query and elements being sought.

Code It Any Way You Want: Comparison of Passing Parameters in Methods

This article explores different methods of passing parameters into methods, including conventional, in operator, and ref readonly approaches, comparing their performance. Despite differences in syntax, benchmark results demonstrate similar performance among these methods.