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/arm64: Regressions in System.Collections.IndexerSet<String> #98174

Closed
performanceautofiler bot opened this issue Feb 8, 2024 · 4 comments
Assignees
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-windows Priority:2 Work that is important, but not critical for the release runtime-coreclr specific to the CoreCLR runtime
Milestone

Comments

@performanceautofiler
Copy link

performanceautofiler bot commented Feb 8, 2024

Run Information

Name Value
Architecture arm64
OS Windows 10.0.19041
Queue SurfaceWindows
Baseline 2361c00717a54a5dd9b0cf727102d64f783855b9
Compare 14b08c8c1194fd509d0bc5c7d11025e2e9150667
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Collections.IndexerSet<String>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
351.46 ns 373.89 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
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Collections.IndexerSet&lt;String&gt;*'

Payloads

Baseline
Compare

System.Collections.IndexerSet<String>.Array(Size: 512)

ETL Files

Histogram

JIT Disasms

Docs

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

@DrewScoggins
Copy link
Member

Looks like the likely change. #97921

@DrewScoggins DrewScoggins removed the untriaged New issue has not been triaged by the area owner label Feb 8, 2024
@DrewScoggins DrewScoggins transferred this issue from dotnet/perf-autofiling-issues Feb 8, 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 8, 2024
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Feb 8, 2024
@DrewScoggins DrewScoggins changed the title [Perf] Windows/arm64: 1 Regression on 2/4/2024 2:48:45 AM [Perf] Windows/arm64: Regressions in System.Collections.IndexerSet<String> Feb 8, 2024
@jeffschwMSFT jeffschwMSFT added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 9, 2024
@ghost
Copy link

ghost commented Feb 9, 2024

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

Run Information

Name Value
Architecture arm64
OS Windows 10.0.19041
Queue SurfaceWindows
Baseline 2361c00717a54a5dd9b0cf727102d64f783855b9
Compare 14b08c8c1194fd509d0bc5c7d11025e2e9150667
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Collections.IndexerSet<String>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
351.46 ns 373.89 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
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Collections.IndexerSet&lt;String&gt;*'

Payloads

Baseline
Compare

System.Collections.IndexerSet<String>.Array(Size: 512)

ETL Files

Histogram

JIT Disasms

Docs

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

Author: performanceautofiler[bot]
Assignees: -
Labels:

arch-arm64, os-windows, area-CodeGen-coreclr, 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 13, 2024
@BruceForstall BruceForstall removed the untriaged New issue has not been triaged by the area owner label Feb 13, 2024
@BruceForstall BruceForstall added this to the 9.0.0 milestone Feb 13, 2024
@jakobbotsch jakobbotsch added the Priority:2 Work that is important, but not critical for the release label May 3, 2024
@jakobbotsch
Copy link
Member

jakobbotsch commented Jun 24, 2024

@EgorBot -arm64 -perf -commit 2d49c2f vs b449152 --disasm

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Extensions;

namespace System.Collections
{
    [GenericTypeArguments(typeof(string))] // reference type
    public class IndexerSet<T>
    {
        [Params(Utils.DefaultCollectionSize)] 
        public int Size;

        private T[] _keys;

        private T[] _array;
        private List<T> _list;
        private Dictionary<T, T> _dictionary;
        private SortedList<T, T> _sortedList;
        private SortedDictionary<T, T> _sortedDictionary;
        private ConcurrentDictionary<T, T> _concurrentDictionary;

        [GlobalSetup(Targets = new[] { nameof(Array), nameof(Span) })]
        public void SetupArray() => _array = ValuesGenerator.ArrayOfUniqueValues<T>(Size);

        [Benchmark]
        public T[] Array()
        {
            var array = _array;
            for (int i = 0; i < array.Length; i++)
                array[i] = default;
            return array;
        }
    }
}

@jakobbotsch
Copy link
Member

Looks fixed if I compare with Windows.11.Arm64.Surf.Perf today.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-windows Priority:2 Work that is important, but not critical for the release runtime-coreclr specific to the CoreCLR runtime
Projects
None yet
Development

No branches or pull requests

5 participants