In this post, the author explores the issue of array comparison performance in .NET, focusing on improvements in .NET and the use of Span for enhanced performance and portability. A popular stackoverflow answer involving the use of msvcrt.dll for comparing byte arrays is discussed. The post includes an in-depth analysis comparing different implementations of array comparison methods, highlighting the significant performance improvements in modern .NET, particularly with the use of Span. The author suggests using IEnumerable.SequenceEqual for optimal performance in .NET 8 and recommends utilizing Span.SequenceEquals for .NET Framework compatibility. The post also discusses considerations for comparing large arrays and suggests utilizing order-sensitive hashing for performance optimization.
https://richardcocks.github.io/2025-03-30-FasterThanMemCmp.html