change if order to improve FileStream perf for cases when both buffers are of the...
authorAdam Sitnik <adam.sitnik@gmail.com>
Mon, 10 May 2021 21:32:58 +0000 (23:32 +0200)
committerGitHub <noreply@github.com>
Mon, 10 May 2021 21:32:58 +0000 (14:32 -0700)
commitde4c4815b26014e4b78761d2b7e7ad6e4eea6c6d
tree4e4d2b33732c2d1c37f14e2f267b97c0132ed07b
parentf57d88a152a76639d3c129ba0bf31f2216e982b8
change if order to improve FileStream perf for cases when both buffers are of the same size (#51489)

* change if order to improve the perf for case where buffer.Length == _bufferSize

* add comment that explains what we are doing and why

* apply the optimization to ReadAsync as well
src/libraries/System.Private.CoreLib/src/System/IO/Strategies/BufferedFileStreamStrategy.cs