Temporary removing string slice span bench test. (dotnet/coreclr#10617)
authorAhson Ahmed Khan <ahsonkhan@users.noreply.github.com>
Fri, 31 Mar 2017 22:27:46 +0000 (15:27 -0700)
committerGitHub <noreply@github.com>
Fri, 31 Mar 2017 22:27:46 +0000 (15:27 -0700)
* Temporary removing string slice bench test.

* Using if false directive to skip breaking tests

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

src/coreclr/tests/src/JIT/Performance/CodeQuality/Span/SpanBench.cs

index 07e5030..8e7c40c 100644 (file)
@@ -1009,7 +1009,7 @@ namespace Span
                 Array.Clear(array, 0, length);
         }
         #endregion
-
+#if false
         #region TestSpanAsBytes<T>
         [Benchmark(InnerIterationCount = BaseIterations)]
         [InlineData(1)]
@@ -1109,6 +1109,7 @@ namespace Span
         #endregion
 
         #region TestSpanSliceStringChar<T>
+        
         [Benchmark(InnerIterationCount = BaseIterations)]
         [InlineData(1)]
         [InlineData(10)]
@@ -1137,15 +1138,16 @@ namespace Span
 
             for (int i = 0; i < iterationCount; i++)
             {
-                var charSpan = s.Slice();
+                var charSpan = s.AsSpan();
                 // Under a condition that we know is false but the jit doesn't,
                 // add a read from 'charSpan' to make sure it's not dead, and an assignment
                 // to 's' so the AsBytes call won't get hoisted.
                 if (untrue) { sink.Data = charSpan[0]; s = "block hoisting the call to Slice()"; }
             }
         }
-        #endregion
 
+        #endregion      
+ #endif
         #endregion // TestSpanAPIs