Skip to content

Commit

Permalink
Fix throughput regression from covariance check
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub committed Jan 17, 2024
1 parent 26db9f8 commit c7b9c24
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;

namespace System.Buffers
Expand Down Expand Up @@ -411,7 +412,7 @@ public bool TryPush(Array array)
_millisecondsTimestamp = 0;
}

arrays[count] = array;
Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(arrays), count) = array; // arrays[count] = array, but avoiding stelemref
_count = count + 1;
enqueued = true;
}
Expand Down

0 comments on commit c7b9c24

Please sign in to comment.