-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Perf -22%] System.Collections.IterateForEach<Int32>.ConcurrentBag #39108
Comments
Tagging subscribers to this area: @eiriktsarpalis |
The regression is apparently at the same time as #39112 and its friends, but as far as I can tell this scenario does not involve Array.Copy. There is one copy of the backing array (there should be only one since it's a single threaded benchmark) to set up the enumerator, but that is done by hand, then enumeration is indexing into it. It is odd though that copying arrays is involved, and the rgression is at the same time. |
I don't have an Ubuntu machine handy at the moment, but confirmed there's no regression on Windows: BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19041.421 (2004/?/20H1) PowerPlanMode=00000000-0000-0000-0000-000000000000 Arguments=/p:DebugType=portable IterationTime=250.0000 ms
|
Just ran them on a lab machine and this is what I am seeing. It's about a 7% regression, so smaller than we were seeing before, but it does seem to be statistically significant. |
That's on Ubuntu 18.04? And Windows looks like no regression for you? |
Yes. No regression on Windows. |
@DrewScoggins I went here to take a look and I don't see it. Is this the wrong link? |
That is the right link. Since it is not in the regression list that means we likely have dropped down in the timing of this test, and looking at this graph, that seems to be the case. This came from this report. You can see we have started to see a little more volatility in that test. Looking at the results from the runtime repo, I see that this test in general seems to have a bimodal state between 2200ns and 2400ns. I am currently working on a feature that will show the entire history of a test, updated daily, that will be linked in these issues so that in cases like this you can see the current state of the test without having to click around through the full report site. |
OK thanks. I find it pretty hard to navigate around https://aka.ms/dotnetperfindex . I found the first graph above but not the second. I opened what I think is the monthly report and it's not there |
I wanted to get a graph with 3.1 on as well so we could see whether it was bimodal then and whether the modes overlapped. |
@layomia @eiriktsarpalis Should we move this to 6.0.0? |
Ran it a few times on my Ubuntu 20.04 VM and I'm not seeing a significant difference in the numbers:
.NET Core 3.1.6
.NET 5
|
Cool -- I will go ahead and close this then. @DrewScoggins, do you see any action items here on the infrastructure side? |
I am still seeing this regression on physical hardware. Would it be possible to try and run these on some physical hardware? I have pasted below the specs of the machine that we are running on, maybe we could try some different hardware to see if this is something directly linked to the processor. 5.0
3.1
|
I am seeing a ~8% regression when run on physical hardware:
.NET Core 3.1
.NET 5
|
@danmosemsft curious, what do you mean when you say it is done by hand? |
Moving to 6.0.0. |
Here are more recent results for the same benchmark. It seems like the regression was mitigated sometime back in November: |
Run Information
Regressions in System.Collections.IterateForEach
Historical Data in Reporting System
Repro
Histogram
System.Collections.IterateForEach.ConcurrentBag(Size: 512)
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
The text was updated successfully, but these errors were encountered: