Skip to content
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

.NET 7.0 RC2 Microbenchmarks Performance Study Report #77150

Open
20 of 26 tasks
jozkee opened this issue Oct 18, 2022 · 9 comments
Open
20 of 26 tasks

.NET 7.0 RC2 Microbenchmarks Performance Study Report #77150

jozkee opened this issue Oct 18, 2022 · 9 comments
Labels
area-Meta tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark tracking This issue is tracking the completion of other related issues.
Milestone

Comments

@jozkee
Copy link
Member

jozkee commented Oct 18, 2022

Data

This time we have covered following configurations comparing .NET 7.0 RC2 vs. .NET 6.0:

  • architectures: arm64, x64
  • Unix: debian 11, ubuntu 18.04, ubuntu 20.04, macOS Monterey 12.6, macOS Big Sur 11.7
  • Windows: 10 & 11
Operating System Bit Processor Name
ubuntu 18.04 Arm64 Unknown processor
Windows 11 Arm64 Unknown processor
Windows 11 Arm64 Microsoft SQ1 3.0 GHz
Windows 11 Arm64 Microsoft SQ1 3.0 GHz
macOS Monterey 12.6 Arm64 Apple M1
macOS Monterey 12.6 Arm64 Apple M1 Max
Windows 10 X64 Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R)
Windows 11 X64 AMD Ryzen Threadripper PRO 3945WX 12-Cores
Windows 11 X64 AMD Ryzen 9 5900X
Windows 11 X64 AMD Ryzen 9 7950X
Windows 11 X64 Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
debian 11 X64 Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
ubuntu 18.04 X64 AMD Ryzen 9 5900X
ubuntu 18.04 X64 Intel Xeon CPU E5-1650 v4 3.60GHz
ubuntu 20.04 X64 AMD Ryzen 9 5900X
ubuntu 20.04 X64 Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R)
ubuntu 20.04 X64 Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
macOS Big Sur 11.7 X64 Intel Core i5-4278U CPU 2.60GHz (Haswell)
macOS Monterey 12.6 X64 Intel Core i7-4870HQ CPU 2.50GHz (Haswell)

Most of the benchmarks were run on bare-metal machines, some were executed via WSL.

This would not be possible without the help from: @adamsitnik, @brianrob, @carlossanlop, @dakersnar, @janvorli, @jeffhandley, @cincuranet, @tannergooding, and @wfurt who contributed their results and time. An addtional thank you to @dakersnar and @EgorBo for shadowing the creation of this report and helping with the vetting of the results!

The full report generated by the tool is available here. You will have to click "Raw" to see the entire file. The report is sorted from most regressed to most improved, so scroll to the bottom in the full report to see improvements. There are plenty of them!

Again, the full historical data turned out to be extremely useful. For details about methodology please read #41871. RC1 report can be found here.

Improvements

We will be analyzing improvements more thoroughly in the upcoming .NET 6 vs .NET 7 GA report. This report is focused on regressions.

Regressions

By Design

Investigation In Progress

Noise, Flaky or Multimodal

The following benchmarks showed up in the report generated by the tool, but were not actual regressions:

  • System.Numerics.Tests.Perf_BigInteger.Add(arguments: 1024,1024 bits)

    • We are seeing 15-25% regressions in the report data but this doesn't match the historical data.
  • System.Numerics.Tests.Perf_Matrix4x4.LerpBenchmark

  • System.Numerics.Tests.Perf_VectorOf<*>.*

Statistics

Total: 86862
Same: 55.57 %
Slower: 7.85 %
Faster: 23.65 %
Noise: 12.88 %
Unknown: 0.04 %

Statistics per Architecture

Architecture Same Slower Faster Noise Unknown
Arm64 50.16 % 2.66 % 34.81 % 12.31 % 0.05 %
X64 58.07 % 10.24 % 18.51 % 13.15 % 0.04 %

Statistics per Operating System

Operating System Same Slower Faster Noise Unknown
macOS Monterey 12.6 49.99 % 2.60 % 34.20 % 13.16 % 0.05 %
ubuntu 18.04 61.50 % 6.66 % 21.50 % 10.25 % 0.09 %
Windows 11 57.64 % 6.26 % 22.91 % 13.15 % 0.03 %
debian 11 63.41 % 7.07 % 16.30 % 13.17 % 0.04 %
macOS Big Sur 11.7 63.45 % 3.35 % 19.18 % 13.94 % 0.07 %
ubuntu 20.04 49.65 % 13.46 % 22.58 % 14.29 % 0.01 %
Windows 10 42.13 % 26.62 % 18.84 % 12.42 % 0.00 %

Statistics per Namespace

Namespace Same Slower Faster Noise Unknown
Benchmark 56.58 % 32.89 % 10.53 % 0.00 % 0.00 %
BenchmarksGame 65.41 % 8.52 % 26.07 % 0.00 % 0.00 %
Benchstone.BenchF 76.84 % 6.05 % 17.11 % 0.00 % 0.00 %
Benchstone.BenchI 53.95 % 10.09 % 35.96 % 0.00 % 0.00 %
Benchstone.MDBenchF 42.11 % 3.16 % 54.74 % 0.00 % 0.00 %
Benchstone.MDBenchI 20.00 % 9.47 % 70.53 % 0.00 % 0.00 %
Devirtualization 65.26 % 2.11 % 1.05 % 31.58 % 0.00 %
Exceptions 77.05 % 1.32 % 21.64 % 0.00 % 0.00 %
FractalPerf 5.26 % 89.47 % 5.26 % 0.00 % 0.00 %
GuardedDevirtualization 69.42 % 0.00 % 4.51 % 26.07 % 0.00 %
IfStatements 33.68 % 0.00 % 66.32 % 0.00 % 0.00 %
Inlining 33.33 % 0.00 % 1.75 % 64.91 % 0.00 %
Interop 89.47 % 0.00 % 10.53 % 0.00 % 0.00 %
JetStream 34.21 % 2.63 % 63.16 % 0.00 % 0.00 %
Layout 84.21 % 0.00 % 15.79 % 0.00 % 0.00 %
Lowering 84.21 % 0.00 % 0.00 % 15.79 % 0.00 %
MicroBenchmarks.Serializers 62.27 % 3.75 % 33.98 % 0.00 % 0.00 %
Microsoft.AspNetCore.Server.Kestrel.Performance 63.16 % 10.53 % 26.32 % 0.00 % 0.00 %
Microsoft.Extensions.Caching.Memory.Tests 69.38 % 13.88 % 16.75 % 0.00 % 0.00 %
Microsoft.Extensions.Configuration 65.50 % 25.15 % 9.36 % 0.00 % 0.00 %
Microsoft.Extensions.Configuration.Xml 65.79 % 5.26 % 28.95 % 0.00 % 0.00 %
Microsoft.Extensions.DependencyInjection 45.67 % 3.57 % 48.90 % 1.87 % 0.00 %
Microsoft.Extensions.Logging 64.66 % 3.16 % 28.42 % 3.76 % 0.00 %
Microsoft.Extensions.Primitives.Performance 50.00 % 0.66 % 1.32 % 48.03 % 0.00 %
Microsoft.Extensions.Primitives 42.40 % 0.29 % 17.84 % 39.47 % 0.00 %
PerfLabTests 56.18 % 12.70 % 24.47 % 6.64 % 0.00 %
PerfLabTests.CastingPerf2 49.12 % 14.04 % 36.84 % 0.00 % 0.00 %
SciMark2 64.21 % 1.05 % 34.74 % 0.00 % 0.00 %
SIMD 90.06 % 0.58 % 9.36 % 0.00 % 0.00 %
Span 79.79 % 0.42 % 19.79 % 0.00 % 0.00 %
StoreBlock 52.81 % 0.00 % 4.04 % 43.16 % 0.00 %
System.Buffers.Binary.Tests 43.42 % 4.61 % 25.66 % 26.32 % 0.00 %
System.Buffers.Tests 54.36 % 10.93 % 28.04 % 6.67 % 0.00 %
System.Buffers.Text.Tests 48.22 % 3.79 % 21.52 % 26.47 % 0.00 %
System.Collections 63.24 % 7.83 % 27.74 % 1.19 % 0.00 %
System.Collections.Concurrent 67.46 % 7.75 % 12.96 % 11.83 % 0.00 %
System.Collections.Tests 53.76 % 5.46 % 28.87 % 11.90 % 0.00 %
System.ComponentModel.Tests 38.76 % 0.48 % 60.77 % 0.00 % 0.00 %
System.ConsoleTests 69.30 % 8.77 % 21.93 % 0.00 % 0.00 %
System.Diagnostics 49.47 % 7.11 % 43.42 % 0.00 % 0.00 %
System.Diagnostics.Tracing 75.00 % 9.21 % 15.79 % 0.00 % 0.00 %
System.Formats.Cbor.Tests 65.99 % 4.05 % 29.96 % 0.00 % 0.00 %
System.Globalization.Tests 75.37 % 6.03 % 15.79 % 2.81 % 0.00 %
System 65.20 % 3.51 % 28.07 % 3.22 % 0.00 %
System.IO.Compression 80.92 % 3.29 % 15.79 % 0.00 % 0.00 %
System.IO.MemoryMappedFiles.Tests 26.36 % 4.09 % 69.55 % 0.00 % 0.00 %
System.IO.Pipelines.Tests 69.74 % 1.32 % 28.95 % 0.00 % 0.00 %
System.IO.Pipes.Tests 73.68 % 16.67 % 9.65 % 0.00 % 0.00 %
System.IO.Tests 60.55 % 12.12 % 24.61 % 2.72 % 0.00 %
System.Linq.Tests 77.64 % 7.45 % 14.17 % 0.73 % 0.00 %
System.MathBenchmarks 87.83 % 1.81 % 8.47 % 1.89 % 0.00 %
System.Memory 51.32 % 1.89 % 19.58 % 27.21 % 0.00 %
System.Net.Http.Tests 42.11 % 31.58 % 26.32 % 0.00 % 0.00 %
System.Net.NetworkInformation.Tests 42.11 % 19.74 % 38.16 % 0.00 % 0.00 %
System.Net.Primitives.Tests 60.29 % 9.57 % 15.55 % 14.59 % 0.00 %
System.Net.Security.Tests 74.10 % 14.43 % 11.48 % 0.00 % 0.00 %
System.Net.Sockets.Tests 49.45 % 23.08 % 27.47 % 0.00 % 0.00 %
System.Net.Tests 71.56 % 13.76 % 14.68 % 0.00 % 0.00 %
System.Net.WebSockets.Tests 47.37 % 39.47 % 13.16 % 0.00 % 0.00 %
System.Numerics.Tests 44.69 % 5.24 % 6.04 % 44.03 % 0.00 %
System.Reflection 30.50 % 2.15 % 64.35 % 2.99 % 0.00 %
System.Runtime.InteropServices.Tests 78.95 % 2.63 % 15.79 % 2.63 % 0.00 %
System.Runtime.Serialization.Formatters.Tests 42.11 % 52.63 % 5.26 % 0.00 % 0.00 %
System.Security.Cryptography.Primitives.Tests.Performance 84.87 % 9.21 % 5.92 % 0.00 % 0.00 %
System.Security.Cryptography.Tests 69.59 % 7.02 % 23.39 % 0.00 % 0.00 %
System.Security.Cryptography.X509Certificates.Tests 73.68 % 12.28 % 14.04 % 0.00 % 0.00 %
System.Tests 50.35 % 12.24 % 25.46 % 11.95 % 0.00 %
System.Text.Encodings.Web.Tests 72.59 % 14.47 % 11.84 % 1.10 % 0.00 %
System.Text.Json.Document.Tests 60.21 % 10.53 % 29.26 % 0.00 % 0.00 %
System.Text.Json.Reader.Tests 46.05 % 15.79 % 38.16 % 0.00 % 0.00 %
System.Text.Json.Serialization.Tests 57.60 % 11.37 % 31.03 % 0.00 % 0.00 %
System.Text.Json.Tests 67.98 % 11.07 % 20.59 % 0.35 % 0.00 %
System.Text 63.51 % 24.21 % 12.28 % 0.00 % 0.00 %
System.Text.RegularExpressions.Tests 16.73 % 5.44 % 76.91 % 0.00 % 0.92 %
System.Text.Tests 57.52 % 21.93 % 18.67 % 1.88 % 0.00 %
System.Threading.Channels.Tests 54.39 % 17.54 % 28.07 % 0.00 % 0.00 %
System.Threading.Tasks.Tests 47.37 % 19.30 % 33.33 % 0.00 % 0.00 %
System.Threading.Tasks 69.55 % 17.67 % 11.65 % 1.13 % 0.00 %
System.Threading.Tests 58.90 % 11.31 % 17.13 % 12.65 % 0.00 %
System.Xml.Linq 59.00 % 9.70 % 22.16 % 9.14 % 0.00 %
System.Xml.Tests 5.26 % 2.11 % 92.63 % 0.00 % 0.00 %
V8.Crypto 78.95 % 15.79 % 5.26 % 0.00 % 0.00 %
V8.Richards 73.68 % 5.26 % 21.05 % 0.00 % 0.00 %
XmlDocumentTests.XmlDocumentTests 40.35 % 22.81 % 21.05 % 15.79 % 0.00 %
XmlDocumentTests.XmlNodeListTests 86.84 % 5.26 % 2.63 % 5.26 % 0.00 %
XmlDocumentTests.XmlNodeTests 36.84 % 2.63 % 0.00 % 60.53 % 0.00 %
System.Drawing.Tests 77.50 % 1.87 % 15.00 % 5.63 % 0.00 %
HardwareIntrinsics.RayTracer 76.92 % 7.69 % 15.38 % 0.00 % 0.00 %

Big thanks to everyone involved!

@jozkee jozkee added area-Meta tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark tracking This issue is tracking the completion of other related issues. labels Oct 18, 2022
@jozkee jozkee added this to the Future milestone Oct 18, 2022
@ghost
Copy link

ghost commented Oct 18, 2022

Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.

Issue Details

Data

This time we have covered following configurations comparing .NET 7.0 RC2 vs. .NET 6.0:

  • architectures: arm64, x64
  • Unix: debian 11, ubuntu 18.04, ubuntu 20.04, macOS Monterey 12.6, macOS Big Sur 11.7
  • Windows: 10 & 11
Operating System Bit Processor Name
ubuntu 18.04 Arm64 Unknown processor
Windows 11 Arm64 Unknown processor
Windows 11 Arm64 Microsoft SQ1 3.0 GHz
Windows 11 Arm64 Microsoft SQ1 3.0 GHz
macOS Monterey 12.6 Arm64 Apple M1
macOS Monterey 12.6 Arm64 Apple M1 Max
Windows 10 X64 Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R)
Windows 11 X64 AMD Ryzen Threadripper PRO 3945WX 12-Cores
Windows 11 X64 AMD Ryzen 9 5900X
Windows 11 X64 AMD Ryzen 9 7950X
Windows 11 X64 Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
debian 11 X64 Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
ubuntu 18.04 X64 AMD Ryzen 9 5900X
ubuntu 18.04 X64 Intel Xeon CPU E5-1650 v4 3.60GHz
ubuntu 20.04 X64 AMD Ryzen 9 5900X
ubuntu 20.04 X64 Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R)
ubuntu 20.04 X64 Intel Core i7-8700 CPU 3.20GHz (Coffee Lake)
macOS Big Sur 11.7 X64 Intel Core i5-4278U CPU 2.60GHz (Haswell)
macOS Monterey 12.6 X64 Intel Core i7-4870HQ CPU 2.50GHz (Haswell)

Most of the benchmarks were run on bare-metal machines, some were executed via WSL.

This would not be possible without the help from: @adamsitnik, @brianrob, @carlossanlop, @dakersnar, @janvorli, @jeffhandley, @cincuranet, @tannergooding, and @wfurt who contributed their results and time. An addtional thank you to @dakersnar and @EgorBo for shadowing the creation of this report and helping with the vetting of the results!

The full report generated by the tool is available here. You will have to click "Raw" to see the entire file. The report is sorted from most regressed to most improved, so scroll to the bottom in the full report to see improvements. There are plenty of them!

Again, the full historical data turned out to be extremely useful. For details about methodology please read #41871. RC1 report can be found here.

Improvements

We will be analyzing improvements more thoroughly in the upcoming .NET 6 vs .NET 7 GA report. This report is focused on regressions.

Regressions

By Design

Investigation In Progress

Noise, Flaky or Multimodal

The following benchmarks showed up in the report generated by the tool, but were not actual regressions:

  • System.Numerics.Tests.Perf_BigInteger.Add(arguments: 1024,1024 bits)

    • We are seeing 15-25% regressions in the report data but this doesn't match the historical data.
  • System.Numerics.Tests.Perf_Matrix4x4.LerpBenchmark

  • System.Numerics.Tests.Perf_VectorOf<*>.*

Statistics

Total: 86862
Same: 55.57 %
Slower: 7.85 %
Faster: 23.65 %
Noise: 12.88 %
Unknown: 0.04 %

Statistics per Architecture

Architecture Same Slower Faster Noise Unknown
Arm64 50.16 % 2.66 % 34.81 % 12.31 % 0.05 %
X64 58.07 % 10.24 % 18.51 % 13.15 % 0.04 %

Statistics per Operating System

Operating System Same Slower Faster Noise Unknown
macOS Monterey 12.6 49.99 % 2.60 % 34.20 % 13.16 % 0.05 %
ubuntu 18.04 61.50 % 6.66 % 21.50 % 10.25 % 0.09 %
Windows 11 57.64 % 6.26 % 22.91 % 13.15 % 0.03 %
debian 11 63.41 % 7.07 % 16.30 % 13.17 % 0.04 %
macOS Big Sur 11.7 63.45 % 3.35 % 19.18 % 13.94 % 0.07 %
ubuntu 20.04 49.65 % 13.46 % 22.58 % 14.29 % 0.01 %
Windows 10 42.13 % 26.62 % 18.84 % 12.42 % 0.00 %

Statistics per Namespace

Namespace Same Slower Faster Noise Unknown
Benchmark 56.58 % 32.89 % 10.53 % 0.00 % 0.00 %
BenchmarksGame 65.41 % 8.52 % 26.07 % 0.00 % 0.00 %
Benchstone.BenchF 76.84 % 6.05 % 17.11 % 0.00 % 0.00 %
Benchstone.BenchI 53.95 % 10.09 % 35.96 % 0.00 % 0.00 %
Benchstone.MDBenchF 42.11 % 3.16 % 54.74 % 0.00 % 0.00 %
Benchstone.MDBenchI 20.00 % 9.47 % 70.53 % 0.00 % 0.00 %
Devirtualization 65.26 % 2.11 % 1.05 % 31.58 % 0.00 %
Exceptions 77.05 % 1.32 % 21.64 % 0.00 % 0.00 %
FractalPerf 5.26 % 89.47 % 5.26 % 0.00 % 0.00 %
GuardedDevirtualization 69.42 % 0.00 % 4.51 % 26.07 % 0.00 %
IfStatements 33.68 % 0.00 % 66.32 % 0.00 % 0.00 %
Inlining 33.33 % 0.00 % 1.75 % 64.91 % 0.00 %
Interop 89.47 % 0.00 % 10.53 % 0.00 % 0.00 %
JetStream 34.21 % 2.63 % 63.16 % 0.00 % 0.00 %
Layout 84.21 % 0.00 % 15.79 % 0.00 % 0.00 %
Lowering 84.21 % 0.00 % 0.00 % 15.79 % 0.00 %
MicroBenchmarks.Serializers 62.27 % 3.75 % 33.98 % 0.00 % 0.00 %
Microsoft.AspNetCore.Server.Kestrel.Performance 63.16 % 10.53 % 26.32 % 0.00 % 0.00 %
Microsoft.Extensions.Caching.Memory.Tests 69.38 % 13.88 % 16.75 % 0.00 % 0.00 %
Microsoft.Extensions.Configuration 65.50 % 25.15 % 9.36 % 0.00 % 0.00 %
Microsoft.Extensions.Configuration.Xml 65.79 % 5.26 % 28.95 % 0.00 % 0.00 %
Microsoft.Extensions.DependencyInjection 45.67 % 3.57 % 48.90 % 1.87 % 0.00 %
Microsoft.Extensions.Logging 64.66 % 3.16 % 28.42 % 3.76 % 0.00 %
Microsoft.Extensions.Primitives.Performance 50.00 % 0.66 % 1.32 % 48.03 % 0.00 %
Microsoft.Extensions.Primitives 42.40 % 0.29 % 17.84 % 39.47 % 0.00 %
PerfLabTests 56.18 % 12.70 % 24.47 % 6.64 % 0.00 %
PerfLabTests.CastingPerf2 49.12 % 14.04 % 36.84 % 0.00 % 0.00 %
SciMark2 64.21 % 1.05 % 34.74 % 0.00 % 0.00 %
SIMD 90.06 % 0.58 % 9.36 % 0.00 % 0.00 %
Span 79.79 % 0.42 % 19.79 % 0.00 % 0.00 %
StoreBlock 52.81 % 0.00 % 4.04 % 43.16 % 0.00 %
System.Buffers.Binary.Tests 43.42 % 4.61 % 25.66 % 26.32 % 0.00 %
System.Buffers.Tests 54.36 % 10.93 % 28.04 % 6.67 % 0.00 %
System.Buffers.Text.Tests 48.22 % 3.79 % 21.52 % 26.47 % 0.00 %
System.Collections 63.24 % 7.83 % 27.74 % 1.19 % 0.00 %
System.Collections.Concurrent 67.46 % 7.75 % 12.96 % 11.83 % 0.00 %
System.Collections.Tests 53.76 % 5.46 % 28.87 % 11.90 % 0.00 %
System.ComponentModel.Tests 38.76 % 0.48 % 60.77 % 0.00 % 0.00 %
System.ConsoleTests 69.30 % 8.77 % 21.93 % 0.00 % 0.00 %
System.Diagnostics 49.47 % 7.11 % 43.42 % 0.00 % 0.00 %
System.Diagnostics.Tracing 75.00 % 9.21 % 15.79 % 0.00 % 0.00 %
System.Formats.Cbor.Tests 65.99 % 4.05 % 29.96 % 0.00 % 0.00 %
System.Globalization.Tests 75.37 % 6.03 % 15.79 % 2.81 % 0.00 %
System 65.20 % 3.51 % 28.07 % 3.22 % 0.00 %
System.IO.Compression 80.92 % 3.29 % 15.79 % 0.00 % 0.00 %
System.IO.MemoryMappedFiles.Tests 26.36 % 4.09 % 69.55 % 0.00 % 0.00 %
System.IO.Pipelines.Tests 69.74 % 1.32 % 28.95 % 0.00 % 0.00 %
System.IO.Pipes.Tests 73.68 % 16.67 % 9.65 % 0.00 % 0.00 %
System.IO.Tests 60.55 % 12.12 % 24.61 % 2.72 % 0.00 %
System.Linq.Tests 77.64 % 7.45 % 14.17 % 0.73 % 0.00 %
System.MathBenchmarks 87.83 % 1.81 % 8.47 % 1.89 % 0.00 %
System.Memory 51.32 % 1.89 % 19.58 % 27.21 % 0.00 %
System.Net.Http.Tests 42.11 % 31.58 % 26.32 % 0.00 % 0.00 %
System.Net.NetworkInformation.Tests 42.11 % 19.74 % 38.16 % 0.00 % 0.00 %
System.Net.Primitives.Tests 60.29 % 9.57 % 15.55 % 14.59 % 0.00 %
System.Net.Security.Tests 74.10 % 14.43 % 11.48 % 0.00 % 0.00 %
System.Net.Sockets.Tests 49.45 % 23.08 % 27.47 % 0.00 % 0.00 %
System.Net.Tests 71.56 % 13.76 % 14.68 % 0.00 % 0.00 %
System.Net.WebSockets.Tests 47.37 % 39.47 % 13.16 % 0.00 % 0.00 %
System.Numerics.Tests 44.69 % 5.24 % 6.04 % 44.03 % 0.00 %
System.Reflection 30.50 % 2.15 % 64.35 % 2.99 % 0.00 %
System.Runtime.InteropServices.Tests 78.95 % 2.63 % 15.79 % 2.63 % 0.00 %
System.Runtime.Serialization.Formatters.Tests 42.11 % 52.63 % 5.26 % 0.00 % 0.00 %
System.Security.Cryptography.Primitives.Tests.Performance 84.87 % 9.21 % 5.92 % 0.00 % 0.00 %
System.Security.Cryptography.Tests 69.59 % 7.02 % 23.39 % 0.00 % 0.00 %
System.Security.Cryptography.X509Certificates.Tests 73.68 % 12.28 % 14.04 % 0.00 % 0.00 %
System.Tests 50.35 % 12.24 % 25.46 % 11.95 % 0.00 %
System.Text.Encodings.Web.Tests 72.59 % 14.47 % 11.84 % 1.10 % 0.00 %
System.Text.Json.Document.Tests 60.21 % 10.53 % 29.26 % 0.00 % 0.00 %
System.Text.Json.Reader.Tests 46.05 % 15.79 % 38.16 % 0.00 % 0.00 %
System.Text.Json.Serialization.Tests 57.60 % 11.37 % 31.03 % 0.00 % 0.00 %
System.Text.Json.Tests 67.98 % 11.07 % 20.59 % 0.35 % 0.00 %
System.Text 63.51 % 24.21 % 12.28 % 0.00 % 0.00 %
System.Text.RegularExpressions.Tests 16.73 % 5.44 % 76.91 % 0.00 % 0.92 %
System.Text.Tests 57.52 % 21.93 % 18.67 % 1.88 % 0.00 %
System.Threading.Channels.Tests 54.39 % 17.54 % 28.07 % 0.00 % 0.00 %
System.Threading.Tasks.Tests 47.37 % 19.30 % 33.33 % 0.00 % 0.00 %
System.Threading.Tasks 69.55 % 17.67 % 11.65 % 1.13 % 0.00 %
System.Threading.Tests 58.90 % 11.31 % 17.13 % 12.65 % 0.00 %
System.Xml.Linq 59.00 % 9.70 % 22.16 % 9.14 % 0.00 %
System.Xml.Tests 5.26 % 2.11 % 92.63 % 0.00 % 0.00 %
V8.Crypto 78.95 % 15.79 % 5.26 % 0.00 % 0.00 %
V8.Richards 73.68 % 5.26 % 21.05 % 0.00 % 0.00 %
XmlDocumentTests.XmlDocumentTests 40.35 % 22.81 % 21.05 % 15.79 % 0.00 %
XmlDocumentTests.XmlNodeListTests 86.84 % 5.26 % 2.63 % 5.26 % 0.00 %
XmlDocumentTests.XmlNodeTests 36.84 % 2.63 % 0.00 % 60.53 % 0.00 %
System.Drawing.Tests 77.50 % 1.87 % 15.00 % 5.63 % 0.00 %
HardwareIntrinsics.RayTracer 76.92 % 7.69 % 15.38 % 0.00 % 0.00 %

Big thanks to everyone involved!

Author: Jozkee
Assignees: -
Labels:

area-Meta, tenet-performance, tenet-performance-benchmarks, tracking

Milestone: Future

@jjxtra
Copy link

jjxtra commented Oct 27, 2022

Hoping BigInteger performance improves. C# getting smoked by python computing pi digits is no bueno. https://programming-language-benchmarks.vercel.app/problem/pidigits

@jeffhandley
Copy link
Member

Thank you, @jjxtra -- it's helpful to know that BigInteger performance is important to you. We've been accumulating issues around BigInteger and we've been thinking about what it might look like to reimplement it for better performance and reliability. That effort isn't going to be committed for .NET 8, but it is on our radar for the future.

It would be helpful data if you could add a comment to #41495 describing your scenarios and how BigInteger's performance affects you. Thanks again!

@jjxtra
Copy link

jjxtra commented Oct 28, 2022

To be honest, it's probably not impacting anyone severely outside of either:

1] Benchmarks, which give C# a sour taste
2] Scientific calculations, which I don't have a use case for

As I mentioned above, someone seeing a benchmark where python beats C# would be puzzling

@tannergooding
Copy link
Member

It's worth noting that just looking at "raw numbers" is also often not sufficient. You often have to compare the actual implementations, considering where devs have diverged algorithms or done customization as well.

In the case of using BigInteger to compute digits of PI, that's really the "naive" approach and isn't necessarily representative of a "real world use-case" for BigInteger. If you wanted to compute digits of PI fast, you'd likely use one of the "spigot" algorithms that allow computing digits without knowing or maintaining the state of all prior digits. This allows you to more easily parallelize and optimize the algorithm, all while taking up less memory/data.

There are certainly cases where we could/should improve the performance of BigInteger, but I'd like to try and drive those off of scenarios that matter the most and which are representative of practical use-cases.

@danmoseley
Copy link
Member

I don't know about that site, but the CLBG which it is based on has two categories -- one for the big integer abstractions, and one for anything goes. On the latter, C# is faster than most.
https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/pidigits.html#intrinsics

@danmoseley
Copy link
Member

As always its great when community members help improve our submissions in both sites..

@jjxtra
Copy link

jjxtra commented Oct 30, 2022

I don't know about that site, but the CLBG which it is based on has two categories -- one for the big integer abstractions, and one for anything goes. On the latter, C# is faster than most. https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/pidigits.html#intrinsics

Very interesting, thanks for the link.

@danmoseley
Copy link
Member

Now I look at the impls there they are all using the GNU arbitrary precision library, so not too interesting perhaps from a .NET point of view. Anyway -- if this stuff interests you perhaps you'd like to look further at what could be done to make things faster, assuming it didn't impact other scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Meta tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark tracking This issue is tracking the completion of other related issues.
Projects
None yet
Development

No branches or pull requests

5 participants