projects
/
platform
/
upstream
/
coreclr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff899f8
)
Add link to https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord (#6430)
author
Jan Kotas
<jkotas@microsoft.com>
Sat, 23 Jul 2016 14:13:22 +0000
(07:13 -0700)
committer
GitHub
<noreply@github.com>
Sat, 23 Jul 2016 14:13:22 +0000
(07:13 -0700)
src/mscorlib/src/System/String.cs
patch
|
blob
|
history
diff --git
a/src/mscorlib/src/System/String.cs
b/src/mscorlib/src/System/String.cs
index
9255c9b
..
067f88a
100644
(file)
--- 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