Why might this SIMD array-adding sample not be demonstrating any performance gains over a naive implementation?
问题 class Program { static void Main(string[] args) { Console.WriteLine(Vector.IsHardwareAccelerated ? "SIMD supported" : "SIMD not supported."); var rand = new Random(); var numNums = 10000000; var arr1 = Enumerable.Repeat(0, numNums).Select(x => (int) (rand.NextDouble() * 100)).ToArray(); var arr2 = Enumerable.Repeat(0, numNums).Select(x => (int) (rand.NextDouble() * 100)).ToArray(); var simdResult = new int [numNums]; var conventionalResult = new int [numNums]; var watch = System.Diagnostics