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

[Perf] Windows/x64: 3 Regressions on 2/19/2024 10:53:50 AM #99006

Closed
performanceautofiler bot opened this issue Feb 27, 2024 · 4 comments · Fixed by #100842
Closed

[Perf] Windows/x64: 3 Regressions on 2/19/2024 10:53:50 AM #99006

performanceautofiler bot opened this issue Feb 27, 2024 · 4 comments · Fixed by #100842

Comments

@performanceautofiler
Copy link

Run Information

Name Value
Architecture x64
OS Windows 10.0.18362
Queue TigerWindows
Baseline d972a19c077e899d0b3fff97d955968e50906396
Compare 5e1caf14fd94b4ed85357002303c8935fedacb8b
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Tests.Perf_String

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
7.88 ns 11.71 ns 1.49 0.31 False
14.48 ns 15.74 ns 1.09 0.09 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
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_String*'

Payloads

Baseline
Compare

System.Tests.Perf_String.IndexOfAny

ETL Files

Histogram

JIT Disasms

System.Tests.Perf_String.Trim(s: " Te st ")

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 Windows 10.0.18362
Queue TigerWindows
Baseline d972a19c077e899d0b3fff97d955968e50906396
Compare 5e1caf14fd94b4ed85357002303c8935fedacb8b
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in Microsoft.Extensions.Primitives.StringSegmentBenchmark

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
6.26 ns 7.91 ns 1.26 0.17 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
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'Microsoft.Extensions.Primitives.StringSegmentBenchmark*'

Payloads

Baseline
Compare

Microsoft.Extensions.Primitives.StringSegmentBenchmark.IndexOfAny

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-windows runtime-coreclr specific to the CoreCLR runtime untriaged New issue has not been triaged by the area owner labels Feb 27, 2024
@DrewScoggins DrewScoggins removed the untriaged New issue has not been triaged by the area owner label Feb 27, 2024
@DrewScoggins DrewScoggins transferred this issue from dotnet/perf-autofiling-issues Feb 27, 2024
@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 Feb 27, 2024
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Feb 27, 2024
@DrewScoggins
Copy link
Member

DrewScoggins commented Feb 27, 2024

@MihaZupan
Copy link
Member

The string IndexOfAny regressions are very likely #96588 (comment) - extra per-call overhead when the JIT can't see the values as constants.
@stephentoub does this look like something we should care about given the values passed to here are usually going to be constants? The relative size of the regression is a bit sad

image

@ghost
Copy link

ghost commented Feb 28, 2024

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

Issue Details

Run Information

Name Value
Architecture x64
OS Windows 10.0.18362
Queue TigerWindows
Baseline d972a19c077e899d0b3fff97d955968e50906396
Compare 5e1caf14fd94b4ed85357002303c8935fedacb8b
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Tests.Perf_String

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
7.88 ns 11.71 ns 1.49 0.31 False
14.48 ns 15.74 ns 1.09 0.09 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
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_String*'

Payloads

Baseline
Compare

System.Tests.Perf_String.IndexOfAny

ETL Files

Histogram

JIT Disasms

System.Tests.Perf_String.Trim(s: " Te st ")

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 Windows 10.0.18362
Queue TigerWindows
Baseline d972a19c077e899d0b3fff97d955968e50906396
Compare 5e1caf14fd94b4ed85357002303c8935fedacb8b
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in Microsoft.Extensions.Primitives.StringSegmentBenchmark

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
6.26 ns 7.91 ns 1.26 0.17 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
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'Microsoft.Extensions.Primitives.StringSegmentBenchmark*'

Payloads

Baseline
Compare

Microsoft.Extensions.Primitives.StringSegmentBenchmark.IndexOfAny

ETL Files

Histogram

JIT Disasms

Docs

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

Author: performanceautofiler[bot]
Assignees: -
Labels:

area-System.Buffers, os-windows, arch-x64, untriaged, runtime-coreclr, needs-area-label

Milestone: -

@vcsjones vcsjones removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Feb 28, 2024
@stephentoub
Copy link
Member

given the values passed to here are usually going to be constants?

It's probably still the right tradeoff, but it'd be nice if we didn't have to make that tradeoff... there are some call sites that don't involve constants (either direct or that the JIT would be able to see via inlining). In the linked comment, you'd mentioned IsKnownConstant... could we follow-up on that to see if there's a possible solution there to let us have our cake and eat it, too?

@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Apr 15, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants