From: Ahson Ahmed Khan Date: Fri, 31 Mar 2017 22:27:46 +0000 (-0700) Subject: Temporary removing string slice span bench test. (dotnet/coreclr#10617) X-Git-Tag: submit/tizen/20210909.063632~11030^2~7472 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=00dc927c6732228db0fda8269f839d0c047d5c20;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Temporary removing string slice span bench test. (dotnet/coreclr#10617) * Temporary removing string slice bench test. * Using if false directive to skip breaking tests Commit migrated from https://github.com/dotnet/coreclr/commit/cb01aa873b8b036dff6301a60d6d4a58f39a0672 --- diff --git a/src/coreclr/tests/src/JIT/Performance/CodeQuality/Span/SpanBench.cs b/src/coreclr/tests/src/JIT/Performance/CodeQuality/Span/SpanBench.cs index 07e5030..8e7c40c 100644 --- a/src/coreclr/tests/src/JIT/Performance/CodeQuality/Span/SpanBench.cs +++ b/src/coreclr/tests/src/JIT/Performance/CodeQuality/Span/SpanBench.cs @@ -1009,7 +1009,7 @@ namespace Span Array.Clear(array, 0, length); } #endregion - +#if false #region TestSpanAsBytes [Benchmark(InnerIterationCount = BaseIterations)] [InlineData(1)] @@ -1109,6 +1109,7 @@ namespace Span #endregion #region TestSpanSliceStringChar + [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