Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Perf] Linux/x64: Enumerable + Linq Regressions on 1/22/2025 11:09:21 PM +00:00 #111914

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

Open
performanceautofiler bot opened this issue Jan 28, 2025 · 3 comments
Assignees
Labels
arch-x64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-linux Linux OS (any supported distro) runtime-coreclr specific to the CoreCLR runtime tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark
Milestone

Comments

@performanceautofiler
Copy link

Run Information

Name Value
Architecture x64
OS ubuntu 22.04
Queue TigerUbuntu
Baseline 1f93ea7763a6391a9063c5e35843253f3d666893
Compare c5bb5057dddf4b5834626e90e63bfd50f0cda3ff
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in LinqBenchmarks

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
212.54 ms 247.31 ms 1.16 0.03 False
164.31 ms 196.43 ms 1.20 0.11 False

graph
graph
Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'LinqBenchmarks*'

LinqBenchmarks.Where01LinqMethodNestedX

ETL Files

Histogram

JIT Disasms

LinqBenchmarks.Where00ForX

ETL Files

Histogram

JIT Disasms

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository


Run Information

Name Value
Architecture x64
OS ubuntu 22.04
Queue TigerUbuntu
Baseline 1f93ea7763a6391a9063c5e35843253f3d666893
Compare c5bb5057dddf4b5834626e90e63bfd50f0cda3ff
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Diagnostics.Perf_Activity

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
2.77 μs 2.99 μs 1.08 0.03 False

graph
Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Diagnostics.Perf_Activity*'

System.Diagnostics.Perf_Activity.EnumerateActivityTagObjectsLarge

ETL Files

Histogram

JIT Disasms

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository


Run Information

Name Value
Architecture x64
OS ubuntu 22.04
Queue TigerUbuntu
Baseline abf8e94296b7842e4d8ba7c9791eaffaf63d2a09
Compare c5bb5057dddf4b5834626e90e63bfd50f0cda3ff
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Linq.Tests.Perf_Enumerable

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
141.72 ns 153.30 ns 1.08 0.04 False

graph
Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Linq.Tests.Perf_Enumerable*'

System.Linq.Tests.Perf_Enumerable.Min(input: IEnumerable)

ETL Files

Histogram

JIT Disasms

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository


Run Information

Name Value
Architecture x64
OS ubuntu 22.04
Queue TigerUbuntu
Baseline abf8e94296b7842e4d8ba7c9791eaffaf63d2a09
Compare c5bb5057dddf4b5834626e90e63bfd50f0cda3ff
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Tests.Perf_Enum

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
88.22 ns 93.81 ns 1.06 0.03 False

graph
Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_Enum*'

System.Tests.Perf_Enum.InterpolateIntoSpan_Flags(value: Red, Green)

ETL Files

Histogram

JIT Disasms

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

@performanceautofiler performanceautofiler bot added arch-x64 os-linux Linux OS (any supported distro) runtime-coreclr specific to the CoreCLR runtime untriaged New issue has not been triaged by the area owner labels Jan 28, 2025
@LoopedBard3 LoopedBard3 transferred this issue from dotnet/perf-autofiling-issues Jan 28, 2025
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 28, 2025
@LoopedBard3 LoopedBard3 changed the title [Perf] Linux/x64: 5 Regressions on 1/22/2025 11:09:21 PM +00:00 [Perf] Linux/x64: Enumerable + Linq Regressions on 1/22/2025 11:09:21 PM +00:00 Jan 28, 2025
@LoopedBard3 LoopedBard3 added tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark labels Jan 28, 2025
@jeffschwMSFT jeffschwMSFT added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 29, 2025
@JulieLeeMSFT JulieLeeMSFT removed the untriaged New issue has not been triaged by the area owner label Feb 3, 2025
@JulieLeeMSFT JulieLeeMSFT added this to the 10.0.0 milestone Feb 3, 2025
@amanasifkhalid amanasifkhalid removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Feb 3, 2025
@amanasifkhalid
Copy link
Member

Notes Recent Score Orig Score Ampere Ubuntu Tiger Ubuntu Tiger Windows Surface Windows Viper Ubuntu Benchmark
1.34 1.33 1.34
1.33
Benchstone.BenchI.BubbleSort.Test
1.17 1.07 1.17
1.06
1.17
1.08
System.Text.Json.Document.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented: True, TestCase: DeepTree)
1.17 1.13 1.17
1.13
System.Numerics.Tensors.Tests.Perf_FloatingPointTensorPrimitives(Single).FusedMultiplyAdd_ScalarMultiplier(BufferLength: 128)
1.08 1.06 1.08
1.06
System.Text.Json.Tests.Perf_Reader.ReadMultiSpanSequenceEmptyLoop(IsDataCompact: False, TestCase: DeepTree)
1.08 1.08 1.08
1.08
System.Numerics.Tensors.Tests.Perf_FloatingPointTensorPrimitives(Single).Log(BufferLength: 3079)
1.08 1.10 1.08
1.10
System.Text.Json.Tests.Perf_Reader.ReadReturnBytes(IsDataCompact: False, TestCase: DeepTree)
1.07 1.06 1.07
1.06
System.Collections.IterateForEachNonGeneric(String).Queue(Size: 512)
1.06 1.06 1.06
1.06
System.Numerics.Tensors.Tests.Perf_FloatingPointTensorPrimitives(Single).Sqrt(BufferLength: 128)
1.05 1.06 1.05
1.06
System.Tests.Perf_Enum.InterpolateIntoSpan_Flags(value: Red, Green)
1.02 1.16 1.02
1.16
LinqBenchmarks.Where01LinqMethodNestedX
0.99 1.08 0.99
1.08
System.Linq.Tests.Perf_Enumerable.Min(input: IEnumerable)
0.98 1.30 0.98
1.30
SciMark2.kernel.benchmarkLU
0.92 1.20 0.92
1.20
LinqBenchmarks.Where00ForX
0.51 1.08 0.51
1.08
System.Diagnostics.Perf_Activity.EnumerateActivityTagObjectsLarge

@amanasifkhalid
Copy link
Member

Updated table, with regressions from #111913 (likely from the same PR):

Notes Recent Score Orig Score Ampere Ubuntu Tiger Ubuntu Tiger Windows Surface Windows Viper Ubuntu Viper Windows Benchmark
2.68 2.67 1.79
1.79
4.02
3.98
System.Memory.Span(Byte).Reverse(Size: 512)
1.95 1.95 1.43
1.42
2.67
2.68
System.Memory.Span(Char).Reverse(Size: 512)
1.85 1.85 1.68
1.68
2.04
2.04
System.Memory.Span(Int32).Reverse(Size: 512)
1.79 1.83 1.79
1.83
System.Memory.Span(Int32).Fill(Size: 512)
1.40 1.39 1.40
1.39
System.Memory.Span(Byte).IndexOfValue(Size: 512)
1.40 1.39 1.40
1.39
System.Numerics.Tensors.Tests.Perf_NumberTensorPrimitives(Int32).BitwiseAnd_Scalar(BufferLength: 128)
1.33 1.33 1.33
1.33
Benchstone.BenchI.BubbleSort.Test
1.31 1.31 1.31
1.31
System.Numerics.Tests.Perf_BigInteger.Equals(arguments: 259 bytes, Same)
1.30 1.30 1.30
1.30
System.Memory.Span(Byte).IndexOfAnyThreeValues(Size: 33)
1.30 1.08 1.30
1.08
System.Text.Encodings.Web.Tests.Perf_Encoders.EncodeUtf8(arguments: UnsafeRelaxed,no (escaping /) required,16)
1.30 1.33 1.30
1.33
System.Memory.Span(Int32).LastIndexOfValue(Size: 512)
1.28 1.27 1.28
1.27
System.Memory.Span(Byte).StartsWith(Size: 512)
1.27 1.28 1.27
1.28
System.Memory.Span(Char).SequenceEqual(Size: 512)
1.26 1.26 1.26
1.26
System.Memory.Span(Int32).SequenceEqual(Size: 512)
1.24 1.23 1.24
1.23
System.Memory.Span(Byte).SequenceEqual(Size: 512)
1.24 1.56 1.24
1.56
System.Numerics.Tensors.Tests.Perf_NumberTensorPrimitives(Int32).Max_Scalar(BufferLength: 128)
1.24 1.24 1.24
1.24
System.Numerics.Tensors.Tests.Perf_NumberTensorPrimitives(Single).Add_Scalar(BufferLength: 128)
1.23 1.28 1.23
1.28
System.Numerics.Tensors.Tests.Perf_FloatingPointTensorPrimitives(Single).Truncate(BufferLength: 128)
1.23 1.24 1.42
1.42
1.07
1.09
System.Buffers.Text.Tests.Base64Tests.ConvertToBase64CharArray(NumberOfBytes: 1000)
1.18 1.07 1.18
1.06
1.17
1.08
System.Text.Json.Document.Tests.Perf_ParseThenWrite.ParseThenWrite(IsDataIndented: True, TestCase: DeepTree)
1.17 1.16 1.17
1.16
System.Numerics.Tensors.Tests.Perf_NumberTensorPrimitives(Single).Divide_Vector(BufferLength: 128)
1.13 1.11 1.08
1.09
1.18
1.13
System.Numerics.Tensors.Tests.Perf_FloatingPointTensorPrimitives(Single).FusedMultiplyAdd_ScalarMultiplier(BufferLength: 128)
1.13 1.20 1.13
1.20
XmlDocumentTests.XmlNodeListTests.Perf_XmlNodeList.GetCount
1.12 1.12 1.12
1.12
System.Numerics.Tensors.Tests.Perf_FloatingPointTensorPrimitives(Single).Distance(BufferLength: 3079)
1.11 1.11 1.11
1.11
System.Text.Perf_Ascii.ToLower_Bytes_Chars(Size: 128)
1.11 1.15 1.11
1.15
System.Text.Perf_Ascii.ToUpper_Bytes_Chars(Size: 128)
1.10 1.11 1.10
1.11
System.Numerics.Tensors.Tests.Perf_NumberTensorPrimitives(Single).Max(BufferLength: 3079)
1.09 1.10 1.09
1.10
System.Memory.Span(Char).LastIndexOfAnyValues(Size: 512)
1.09 1.10 1.09
1.10
System.Numerics.Tensors.Tests.Perf_NumberTensorPrimitives(Int32).AddMultiply_Vectors(BufferLength: 128)
1.08 1.09 1.08
1.09
System.Numerics.Tensors.Tests.Perf_NumberTensorPrimitives(Single).BitwiseAnd_Vector(BufferLength: 128)
1.08 1.06 1.08
1.06
System.Text.Json.Tests.Perf_Reader.ReadMultiSpanSequenceEmptyLoop(IsDataCompact: False, TestCase: DeepTree)
1.08 1.11 1.08
1.11
System.Numerics.Tensors.Tests.Perf_FloatingPointTensorPrimitives(Single).FusedMultiplyAdd_Vectors(BufferLength: 128)
1.08 1.08 1.08
1.08
System.Numerics.Tensors.Tests.Perf_FloatingPointTensorPrimitives(Single).Log(BufferLength: 3079)
1.07 1.06 1.07
1.06
System.Collections.IterateForEachNonGeneric(String).Queue(Size: 512)
1.07 1.08 1.07
1.08
System.Numerics.Tensors.Tests.Perf_NumberTensorPrimitives(Single).AddMultiply_Vectors(BufferLength: 128)
1.07 1.08 1.07
1.08
System.Numerics.Tensors.Tests.Perf_FloatingPointTensorPrimitives(Double).Truncate(BufferLength: 128)
1.06 2.08 1.06
2.08
System.Threading.Tests.Perf_Interlocked.CompareExchange_int
1.06 1.06 1.06
1.06
System.Numerics.Tensors.Tests.Perf_FloatingPointTensorPrimitives(Single).Sqrt(BufferLength: 128)
1.06 1.10 1.06
1.10
System.Text.Json.Tests.Perf_Reader.ReadReturnBytes(IsDataCompact: False, TestCase: DeepTree)
1.06 1.06 1.06
1.06
System.Numerics.Tensors.Tests.Perf_FloatingPointTensorPrimitives(Double).Sqrt(BufferLength: 128)
1.06 1.18 1.06
1.18
Microsoft.Extensions.Primitives.StringSegmentBenchmark.Equals_Object_Valid
1.06 1.17 1.06
1.17
System.Buffers.Tests.RentReturnArrayPoolTests(Object).ProducerConsumer(RentalSize: 4096, ManipulateArray: False, Async: True, UseSharedPool: False)
1.06 1.06 1.06
1.06
System.Text.Perf_Ascii.Equals_Bytes_Chars(Size: 128)
1.06 1.05 1.06
1.05
System.Memory.Span(Char).Clear(Size: 512)
1.06 1.06 1.06
1.06
System.Numerics.Tensors.Tests.Perf_NumberTensorPrimitives(Single).IndexOfMax(BufferLength: 128)
1.05 1.05 1.05
1.05
Layout.SearchLoops.LoopReturn
1.05 1.05 1.05
1.05
System.Numerics.Tensors.Tests.Perf_NumberTensorPrimitives(Int32).MaxMagnitude_Vector(BufferLength: 128)
1.03 1.16 1.03
1.16
LinqBenchmarks.Where01LinqMethodNestedX
1.03 1.06 1.03
1.06
System.Tests.Perf_Enum.InterpolateIntoSpan_Flags(value: Red, Green)
1.03 1.07 1.03
1.07
System.Text.Encodings.Web.Tests.Perf_Encoders.EncodeUtf8(arguments: UnsafeRelaxed,no (escaping /) required,512)
1.01 1.21 1.01
1.21
System.Memory.Span(Char).IndexOfAnyFourValues(Size: 33)
1.00 1.30 1.00
1.30
SciMark2.kernel.benchmarkLU
0.99 1.17 0.99
1.17
System.Text.Json.Tests.Perf_Base64.WriteByteArrayAsBase64_HeavyEscaping(NumberOfBytes: 100)
0.98 1.09 0.98
1.09
System.Memory.Span(Int32).IndexOfAnyThreeValues(Size: 33)
0.98 1.06 0.98
1.06
System.Memory.SequenceReader.TryReadTo
0.98 1.08 0.98
1.08
System.Linq.Tests.Perf_Enumerable.Min(input: IEnumerable)
0.97 1.14 0.97
1.14
System.Tests.Perf_Int64.TryFormat(value: 12345)
0.97 1.14 0.97
1.14
PerfLabTests.LowLevelPerf.GenericClassGenericInstanceMethod
0.96 1.09 0.96
1.09
System.Text.Json.Serialization.Tests.WriteJson(ClassRecord).SerializeToUtf8Bytes(Mode: Reflection)
0.94 1.08 0.94
1.08
System.Memory.Span(Byte).LastIndexOfAnyValues(Size: 512)
0.93 1.08 0.93
1.08
System.Memory.Span(Byte).IndexOfAnyTwoValues(Size: 512)
0.90 1.20 0.90
1.20
LinqBenchmarks.Where00ForX
0.73 2.37 0.73
2.37
System.Collections.Tests.Perf_BitArray.BitArrayNot(Size: 512)
0.70 1.07 0.70
1.07
System.Text.Encodings.Web.Tests.Perf_Encoders.EncodeUtf8(arguments: JavaScript,no escaping required,512)
0.52 1.60 0.52
1.60
System.Threading.Tasks.ValueTaskPerfTest.CreateAndAwait_FromResult
0.49 1.08 0.49
1.08
System.Diagnostics.Perf_Activity.EnumerateActivityTagObjectsLarge

Span.Reverse benchmarks look like a good starting point for investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-x64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-linux Linux OS (any supported distro) runtime-coreclr specific to the CoreCLR runtime tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark
Projects
None yet
Development

No branches or pull requests

4 participants