-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Address more issue numbers in the code #1888
Conversation
Replaced a bunch of unadorned issue numbers with links, so we know which repo the issue is for. In some cases the repo was named, but for consistency I still replaced it with a link. In some cases, in particular where the issue had been closed saying effectively "we're not going to do anything here", I removed TODOs and the associated issue numbers. In a few cases, the TODO and issue number was to say "we should do X when Y is fixed", so I did X since Y was fixed.
src/libraries/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTransform.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/EdgeCasesTests.cs
Outdated
Show resolved
Hide resolved
Co-Authored-By: Jan Kotas <jkotas@microsoft.com>
I hadn't planned on this being a perf-related PR, but as a happy accident, one of the issue numbers I was fixing up referred to a fix that could be made in LINQ's sorting implementation when a new Array.Sort overload was added. We ended up rejecting the proposal for that overload due to compatibility concerns, but the issue can be addressed similarly using the new span-based sorting methods we recently added. The core sorting routine had been doing: Array.Sort(keys, lo, hi - lo + 1, Comparer<int>.Create(CompareAnyKeys)); We have the CompareAnyKeys method, and we want to use it as the comparer for Array.Sort, but there's no overload that takes a new Span<int>(keys, lo, hi - lo + 1).Sort(CompareAnyKeys); we pay for just one rather than two allocations, and we use the using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System;
using System.Linq;
public class Program
{
static void Main(string[] args) => BenchmarkSwitcher.FromAssemblies(new[] { typeof(Program).Assembly }).Run(args);
public Program()
{
var r = new Random(42);
_array = new int[1_000];
for (int i = 0; i < _array.Length; i++) _array[i] = r.Next();
}
private readonly int[] _array;
[Benchmark]
public void Sort()
{
foreach (int i in _array.OrderBy(i => i)) { }
}
}
|
Replaced a bunch of unadorned issue numbers with links, so we know which repo the issue is for. In some cases the repo was named, but for consistency I still replaced it with a link.
In some cases, in particular where the issue had been closed saying effectively "we're not going to do anything here", I removed TODOs and the associated issue numbers.
In a few cases, the TODO and issue number was to say "we should do X when Y is fixed", so I did X since Y was fixed.
cc: @jaredpar, @danmosemsft