Speedup SpanHelpers.IndexOf{Any}(byte, ...) (#22118)
authorBen Adams <thundercat@illyriad.co.uk>
Thu, 24 Jan 2019 03:33:49 +0000 (04:33 +0100)
committerJan Kotas <jkotas@microsoft.com>
Thu, 24 Jan 2019 03:33:49 +0000 (19:33 -0800)
commit07d1e6b0c5dc2b5353b9cbc9c3d2385af3587552
treef8c62402d4addd26763bbbde61a5a4d7c8fcf6e1
parentb41c67f0c457199953ad93c14fd1c08fa08fb5e0
Speedup SpanHelpers.IndexOf{Any}(byte, ...) (#22118)

* Speedup SpanHelpers.IndexOf(byte)

* 128 * 2 alignment

* Move TrailingZeroCountFallback to common SpanHelpers

So it can be used by other types than byte

* Speedup SpanHelpers.IndexOfAny(byte, ...)

* Indent for support flags

* More helpers, constency in local names/formatting, feedback

* Skip bounds check in software fallback
src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
src/System.Private.CoreLib/shared/System/BitOps.cs [new file with mode: 0644]
src/System.Private.CoreLib/shared/System/SpanHelpers.Byte.cs
src/System.Private.CoreLib/shared/System/SpanHelpers.cs