diff options
author | Michelle McDaniel <adiaaida@gmail.com> | 2017-12-04 14:01:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-04 14:01:07 -0800 |
commit | 6eaf27dac5952ea02e9136e40e2fba7be3774479 (patch) | |
tree | cdd0693f6c574140df4510599bdc0b11652524e6 /tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs | |
parent | ca7448ce6f1916bba5ae3597ca17506272834651 (diff) | |
download | coreclr-6eaf27dac5952ea02e9136e40e2fba7be3774479.tar.gz coreclr-6eaf27dac5952ea02e9136e40e2fba7be3774479.tar.bz2 coreclr-6eaf27dac5952ea02e9136e40e2fba7be3774479.zip |
Separate large perf benchmarks into their own legs (#15231)
Separate large perf benchmarks into their own legs
This change splits the windows perf test stages into 6 pipelined legs per flavor to reduce the amount of time we spend running the perf tests and reduce the total time of the job. This change also decreases the size of the stashed bin directory by deleting the obj directory. Finally, we move the benchstones suite into one directory (moving BenchF and BenchI into a shared dir called Benchstones)
Diffstat (limited to 'tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs')
-rw-r--r-- | tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs deleted file mode 100644 index d499441822..0000000000 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/8Queens/8Queens.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// - -using Microsoft.Xunit.Performance; -using System; -using System.Runtime.CompilerServices; -using Xunit; - -[assembly: OptimizeForBenchmarks] - -namespace Benchstone.BenchI -{ -public static class EightQueens -{ - -#if DEBUG - public const int Iterations = 1; -#else - public const int Iterations = 100000; -#endif - - static int[] m_c = new int[15]; - static int[] m_x = new int[9]; - - static void TryMe(int i, ref int q, int[] a, int[] b) - { - int j = 0; - q = 0; - while ((q == 0) && (j != 8)) { - j = j + 1; - q = 0; - if ((b[j] == 1) && (a[i + j] == 1) && (m_c[i - j + 7] == 1)) { - m_x[i] = j; - b[j] = 0; - a[i + j] = 0; - m_c[i - j + 7] = 0; - if (i < 8) { - TryMe(i + 1, ref q, a, b); - if (q == 0) { - b[j] = 1; - a[i + j] = 1; - m_c[i - j + 7] = 1; - } - } - else { - q = 1; - } - } - } - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static bool Bench() { - int[] a = new int[9]; - int[] b = new int[17]; - int q = 0; - int i = 0; - while (i <= 16) { - if ((i >= 1) && (i <= 8)) { - a[i] = 1; - } - if (i >= 2) { - b[i] = 1; - } - if (i <= 14) { - m_c[i] = 1; - } - i = i + 1; - } - - TryMe(1, ref q, b, a); - - return (q == 1); - } - - [Benchmark] - public static void Test() { - foreach (var iteration in Benchmark.Iterations) { - using (iteration.StartMeasurement()) { - for (int i = 0; i < Iterations; i++) { - Bench(); - } - } - } - } - - static bool TestBase() { - bool result = true; - for (int i = 0; i < Iterations; i++) { - result &= Bench(); - } - return result; - } - - public static int Main() { - bool result = TestBase(); - return (result ? 100 : -1); - } -} -} |