-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Use double.ConvertToIntegerNative where safe to do in System.Random #112046
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 31, 2025
stephentoub
approved these changes
Jan 31, 2025
(Thanks Egor! Makes it a lot easier to get the perf numbers shared) |
@EgorBot -amd -arm -profiler --envvars JitDisasm:InversionMutation using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;
public class Benchmarks
{
private const int Seed = 100;
private static readonly int[] Chromosome = new int[59];
private static readonly Random Random = new(Seed);
public Benchmarks()
{
var genes = Enumerable.Range(1, 59).ToArray();
Random.Shuffle(genes);
genes.CopyTo(Chromosome.AsSpan());
}
[Benchmark]
public int[] InversionMutation()
{
var idx1 = 0;
var idx2 = 0;
var chromosomeLength = Chromosome.Length;
while (idx1 == idx2)
{
idx1 = Random.Next(chromosomeLength);
idx2 = Random.Next(chromosomeLength);
}
if (idx1 > idx2)
{
(idx1, idx2) = (idx2, idx1);
}
Array.Reverse(Chromosome, idx1, idx2 - idx1 + 1);
return Chromosome;
}
} |
grendello
added a commit
to grendello/runtime
that referenced
this pull request
Feb 3, 2025
* main: System.Net.Http.WinHttpHandler.StartRequestAsync assertion failed (dotnet#109799) Keep test PDB in helix payload for native AOT (dotnet#111949) Build the RID-specific System.IO.Ports packages in the VMR (dotnet#112054) Always inline number conversions (dotnet#112061) Use Contains{Any} in Regex source generator (dotnet#112065) Update dependencies from https://github.com/dotnet/arcade build 20250130.5 (dotnet#112013) JIT: Transform single-reg args to FIELD_LIST in physical promotion (dotnet#111590) Ensure that math calls into the CRT are tracked as needing vzeroupper (dotnet#112011) Use double.ConvertToIntegerNative where safe to do in System.Random (dotnet#112046) JIT: Compute `fgCalledCount` after synthesis (dotnet#112041) Simplify boolean logic in `TimeZoneInfo` (dotnet#112062) JIT: Update type when return temp is freshly created (dotnet#111948) Remove unused build controls and simplify DotNetBuild.props (dotnet#111986) Fix case-insensitive JSON deserialization of enum member names (dotnet#112028) WasmAppBuilder: Remove double computation of a value (dotnet#112047) Disable LTCG for brotli and zlibng. (dotnet#111805) JIT: Improve x86 unsigned to floating cast codegen (dotnet#111595) simplify x86 special intrinsic imports (dotnet#111836) JIT: Try to retain entry weight during profile synthesis (dotnet#111971) Fix explicit offset of ByRefLike fields. (dotnet#111584)
This was referenced Feb 4, 2025
Closed
[Perf] Windows/x64: 5 Improvements on 2/1/2025 7:06:23 PM +00:00
dotnet/perf-autofiling-issues#49485
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
needs-area-label
An area label is needed to ensure this gets routed to the appropriate area owners
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This resolves #108096