Update to latest System.Memory
authorJan Kotas <jkotas@microsoft.com>
Tue, 4 Jul 2017 14:45:31 +0000 (07:45 -0700)
committerJan Kotas <jkotas@microsoft.com>
Tue, 4 Jul 2017 19:31:49 +0000 (12:31 -0700)
tests/src/JIT/Performance/CodeQuality/Span/SpanBench.cs
tests/src/JIT/config/benchmark/benchmark.csproj

index 5cb838f..c9a4c7b 100644 (file)
@@ -1038,11 +1038,11 @@ namespace Span
 
             for (int i = 0; i < iterationCount; i++)
             {
-                var charSpan = s.AsSpan();
+                var charSpan = s.AsReadOnlySpan();
                 // 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 AsSpan()"; }
+                if (untrue) { sink.Data = charSpan[0]; s = "block hoisting the call to AsReadOnlySpan()"; }
             }
         }
 
index f739151..d6d4a51 100644 (file)
@@ -44,7 +44,7 @@
       <Version>4.4.0-beta-24913-02</Version>
     </PackageReference>
     <PackageReference Include="System.Memory">
-      <Version>4.4.0-preview2-25302-03</Version>
+      <Version>4.5.0-preview2-25504-02</Version>
     </PackageReference>
     <PackageReference Include="System.Numerics.Vectors">
       <Version>4.4.0-preview2-25302-03</Version>