Reduce case iteration counts in SeekUnroll.
authorPat Gavlin <pagavlin@microsoft.com>
Thu, 16 Mar 2017 23:08:06 +0000 (16:08 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Thu, 16 Mar 2017 23:08:06 +0000 (16:08 -0700)
This test was taking too long to run on x86. After investigation, it
does not appear that there is a fundamental problem with the code
generated for the test; rather, it seems that we are running an
excessive number of iterations when using this test as a correctness
test. This change reduces the number of times we run each case from 10
to 1 unless otherwise specified on the command line.

Commit migrated from https://github.com/dotnet/coreclr/commit/13867720e00706ade79e6030f6e8441fbfdef41c

src/coreclr/tests/src/JIT/Performance/CodeQuality/SIMD/SeekUnroll/SeekUnroll.cs

index 3253e25..3915caf 100644 (file)
@@ -140,7 +140,7 @@ public static class SeekUnroll
 
 
     // Main method entrypoint runs the manual timer loop
-    public static int Main()
+    public static int Main(string[] args)
     {
         int failures = 0;
 
@@ -151,9 +151,10 @@ public static class SeekUnroll
             InnerIterations = 100000;
         }
 
+        int manualLoopCount = (args != null && args.Length >= 1) ? int.Parse(args[0]) : 1;
         foreach(int index in IndicesToTest)
         {
-            ManualLoopTimes = new long[10];
+            ManualLoopTimes = new long[manualLoopCount];
             bool passed = Test(index, false);
             if (!passed)
             {