Fix major System.Memory performance regression on .NET Framework x86 (#28179)
authorJan Kotas <jkotas@microsoft.com>
Mon, 19 Mar 2018 21:10:18 +0000 (14:10 -0700)
committerJan Kotas <jkotas@microsoft.com>
Tue, 20 Mar 2018 14:37:31 +0000 (07:37 -0700)
commitdfd1f1caa5685e968be2a845b5c0bc3ad17390dc
treecae8f35f47a74c911ad9ac697c45304831d36f6a
parentff2abe597b602c5228bae66c9f3f581a632ff4fb
Fix major System.Memory performance regression on .NET Framework x86 (#28179)

* Use Unsafe.AddByteOffset instead of Unsafe.Add where possible

* Use pointer for NUint backing field

* Delete unnecessary unchecked scopes, fixed comments

* Avoid unnecessary overflow checks when converting from IntPtr

* Switch SequenceEqual to IntPtr pointer arithmetic

This is fixing 10x regression introduced by use of NUint

* Delete NUint operators that are no longer necessary

* Fix CoreCLR build break

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
src/mscorlib/shared/System/SpanHelpers.Byte.cs