示例#1
0
        public int[] Reverse_BCL()
        {
            var copy = ArrayOfInts.ToArray();

            Array.Reverse(copy, 0, copy.Length); // https://github.com/dotnet/coreclr/blob/master/src/System.Private.CoreLib/src/System/Array.cs#L1568-L1592
            return(copy);
        }
示例#2
0
        public int[] Reverse_SSE()
        {
            var copy = ArrayOfInts.ToArray();

            ArrayIntrinsics.Reverse_Sse2(copy);
            return(copy);
        }
示例#3
0
 //[Benchmark]
 public bool IsSorted_LINQ()
 {
     // I am just kidding.. :)
     return(ArrayOfInts.OrderBy(i => i).SequenceEqual(ArrayOfInts));
 }
示例#4
0
 public int Max_LINQ()
 {
     return(ArrayOfInts.Max());
 }
示例#5
0
 public int Max_LinqFasterLib()
 {
     return(ArrayOfInts.MaxS());
 }