diff options
Diffstat (limited to 'tests/src/JIT/Performance/CodeQuality/BenchI/TreeSort/TreeSort.cs')
-rw-r--r-- | tests/src/JIT/Performance/CodeQuality/BenchI/TreeSort/TreeSort.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/src/JIT/Performance/CodeQuality/BenchI/TreeSort/TreeSort.cs b/tests/src/JIT/Performance/CodeQuality/BenchI/TreeSort/TreeSort.cs index 68b5c965f7..e0971346cf 100644 --- a/tests/src/JIT/Performance/CodeQuality/BenchI/TreeSort/TreeSort.cs +++ b/tests/src/JIT/Performance/CodeQuality/BenchI/TreeSort/TreeSort.cs @@ -11,6 +11,8 @@ using Xunit; [assembly: OptimizeForBenchmarks] [assembly: MeasureInstructionsRetired] +namespace Benchstone.BenchI +{ public static class TreeSort { @@ -74,7 +76,7 @@ public static class TreeSort else { Insert(n, t.Left); } - } + } else if (n < t.Val) { if (t.Right == null) { t.Right = new Node(n); @@ -117,7 +119,7 @@ public static class TreeSort bool result = CheckTree(tree); return result; } - + [MethodImpl(MethodImplOptions.NoInlining)] static bool Bench() { int[] sortList = new int[SortElements + 1]; @@ -143,9 +145,10 @@ public static class TreeSort } return result; } - + public static int Main() { bool result = TestBase(); return (result ? 100 : -1); } } +} |