Use local array in ConcurrentQueue<T> for small perf improvement (dotnet/coreclr#21192)
Enqueue/TryDequeue/TryPeek are all repeatedly accessing the same array from a readonly field. Changing them to instead access that same array but from a cached local results in an ~10% throughput boost on a microbenchmark that does uncontended reads/writes of objects from/to the queue. (I also tried using a ref local to point directly to the target slot in the array, but that actually resulted in a measurable regression.)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e41401ed9c1070971d2062e971fed14d1747be78