diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-07-23 07:13:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-23 07:13:22 -0700 |
commit | ac01e272bbbf6ce03f69843326d7fdfc74df245a (patch) | |
tree | 62ac89175ad759ee7069c33a009f023cce4a8531 | |
parent | ff899f8cb3a32b33d14d7527d7f972b9458eaed4 (diff) | |
download | coreclr-ac01e272bbbf6ce03f69843326d7fdfc74df245a.tar.gz coreclr-ac01e272bbbf6ce03f69843326d7fdfc74df245a.tar.bz2 coreclr-ac01e272bbbf6ce03f69843326d7fdfc74df245a.zip |
Add link to https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord (#6430)
-rw-r--r-- | src/mscorlib/src/System/String.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mscorlib/src/System/String.cs b/src/mscorlib/src/System/String.cs index 9255c9bb22..067f88a605 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 |