Improve pref of `Array.IndexOf()` for certain `T`. (dotnet/coreclr#24293)
commit6291956230861b4d57e2c8a07a50dff7de2406df
authordschinde <dschindelman@gmail.com>
Tue, 30 Apr 2019 00:38:49 +0000 (29 19:38 -0500)
committerMarek Safar <marek.safar@gmail.com>
Tue, 30 Apr 2019 07:39:12 +0000 (30 09:39 +0200)
treee3aa57fc7d7c72303b0819d568e20b8b9f7d2610
parentcee12683355f1a7dd1acac90c5d9ddec79b844f2
Improve pref of `Array.IndexOf()` for certain `T`. (dotnet/coreclr#24293)

Applies changes to `Array.IndexOf()` and `Array.LastIndexOf()` similar
to the changes made in #20855, so that types other than `byte` and
`char` can use use the fast vectorized path.

Also allows 32-bit and 64-bit types for which
`RuntimeHelpers.IsBitwiseEquatable<T>()` returns `true` to use the
faster implementation of `IndexOf` and `LastIndexOf` from
`MemoryExtensions`.

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
netcore/System.Private.CoreLib/shared/System/Array.cs