Extensions - updated comment

This commit is contained in:
MrGadget1024 2023-02-16 09:07:55 -05:00
parent 2f2a6907de
commit 4f1a1899aa

View File

@ -9,9 +9,9 @@ public static class Extensions
public static string ToHexString(this ArraySegment<byte> segment) =>
BitConverter.ToString(segment.Array, segment.Offset, segment.Count);
// string.GetHashCode is not guaranteed to be the same on all machines, but
// we need one that is the same on all machines. simple and stupid:
// NOTE: Do not call this from hot path because it's slow for long method names.
// string.GetHashCode is not guaranteed to be the same on all
// machines, but we need one that is the same on all machines.
// NOTE: Do not call this from hot path because it's slow O(N) for long method names.
// - As of 2012-02-16 There are 2 design-time callers (weaver) and 1 runtime caller that caches.
public static int GetStableHashCode(this string text)
{