Closed performanceautofiler[bot] closed 8 months ago
Only EmptyTakeSelectToArray
seems to be valid. Diff.
Regression is on all platforms:
Tagging subscribers to this area: @dotnet/area-system-linq See info in area-owners.md if you want to be subscribed.
Author: | performanceautofiler[bot] |
---|---|
Assignees: | - |
Labels: | `arch-arm64`, `area-System.Linq`, `os-windows`, `untriaged`, `runtime-coreclr` |
Milestone: | - |
Only EmptyTakeSelectToArray seems to be valid. Diff.
I think we need to accept this one. The gap has come back down a bit, to less than 10ns. The issue is we're now checking for empty arrays rather than a dedicated empty sentinel, and the perf test is using T == int, which requires covariance checks (since eg a uint[] will also pass as an int[]). So the couple of times on this path that we're testing for empty, that check is a bit more expensive than it used to be. However, it's also more comprehensive than it used to be, so whereas previously we'd only have special-cased empty inputs that came from Enumerable.Empty<T>
, now we'll special-case both that and inputs from Array.Empty<T>()
(which is what collection literals produce) and new T[i]
where i == 0, etc.
Run Information
Regressions in System.Linq.Tests.Perf_Enumerable
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md