I am reading C# in a Nutshell and I encounter this paragraph:
The default structural equality comparison algorithm for structs is relatively slow. Taking over this process by overriding Equals can improve performance by a factor of five. Overloading the
==operator and implementingIEquatable<T>allows unboxed equality comparisons, and this can speed things up by a factor of five again.
I understand that defining == & != operators can increase performance by preventing unnecessary boxing, but I can't understand why overriding Equals can improve performance by a factor of 5. can anybody describe it to me?
Thanks in advance!