Speedup SpanHelpers.IndexOf{Any}(byte, ...) (dotnet/coreclr#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)
commit98524fc790efaef5117e7f220f7a1dd791cfeeee
tree210c0f4a87c596e90902efcce8fd786dc344d105
parentd2143cb4e480c8b1441de7ae84f1805dab85c198
Speedup SpanHelpers.IndexOf{Any}(byte, ...) (dotnet/coreclr#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

Commit migrated from https://github.com/dotnet/coreclr/commit/07d1e6b0c5dc2b5353b9cbc9c3d2385af3587552
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
src/libraries/System.Private.CoreLib/src/System/BitOps.cs [new file with mode: 0644]
src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs
src/libraries/System.Private.CoreLib/src/System/SpanHelpers.cs