Add link to https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord (#6430)
authorJan Kotas <jkotas@microsoft.com>
Sat, 23 Jul 2016 14:13:22 +0000 (07:13 -0700)
committerGitHub <noreply@github.com>
Sat, 23 Jul 2016 14:13:22 +0000 (07:13 -0700)
src/mscorlib/src/System/String.cs

index 9255c9b..067f88a 100644 (file)
@@ -1703,6 +1703,8 @@ namespace System {
             Contract.Assert(end[0] == 0 || end[1] == 0);
             if (end[0] != 0) end++;
 #else // !BIT64
+            // Based on https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord
+
             // 64-bit implementation: process 1 ulong (word) at a time
 
             // What we do here is add 0x7fff from each of the