From ac01e272bbbf6ce03f69843326d7fdfc74df245a Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Sat, 23 Jul 2016 07:13:22 -0700 Subject: [PATCH] Add link to https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord (#6430) --- src/mscorlib/src/System/String.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mscorlib/src/System/String.cs b/src/mscorlib/src/System/String.cs index 9255c9b..067f88a 100644 --- a/src/mscorlib/src/System/String.cs +++ b/src/mscorlib/src/System/String.cs @@ -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 -- 2.7.4