Cache GetLowerBound in Array.Reverse and Array.Sort (dotnet/coreclr#5019)
authorHugh Bellamy <hughbellars@gmail.com>
Wed, 18 May 2016 21:27:37 +0000 (22:27 +0100)
committerJan Kotas <jkotas@microsoft.com>
Wed, 18 May 2016 21:27:37 +0000 (14:27 -0700)
commit3cb7a1a172852aa6350506a91c56b6de4110edfc
tree0a07d22eb7fb23773d574aa6e2b805eb733cd558
parent22a5c4282dbce648aa73a23d89a7f73374558802
Cache GetLowerBound in Array.Reverse and Array.Sort (dotnet/coreclr#5019)

- Avoids calling internal native method 4 times per sort: 2 times is
enough
- Avoids calling internal native method 2 times per reverse: 1 time is
enough

Commit migrated from https://github.com/dotnet/coreclr/commit/a2fb9c1cead47d21723a137e6fc13ba4577c5c66
src/coreclr/src/mscorlib/src/System/Array.cs