An extremely important part of using structs is overriding the Equals and GetHashCode methods. If you don’t, you will get the default versions, which are not at all good for performance. To get an idea of how bad it is, use an IL viewer and look at the code for the ValueType.Equals method. It involves... Continue Reading →
Coding for Performance : Virtual Methods and Sealed Classes
Coding for Performance : Virtual Methods and Sealed Classes