-
Notifications
You must be signed in to change notification settings - Fork 1
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
EgorBot for EgorBo in #107437 #80
Comments
Benchmark results on
|
Method | Toolchain | Mean | Error | Ratio |
---|---|---|---|---|
StelemRef | Main | 5.237 ns | 0.0007 ns | 1.00 |
StelemRef | PR | 5.302 ns | 0.0005 ns | 1.01 |
BulkCopy_heap | Main | 8.147 ns | 0.0233 ns | 1.00 |
BulkCopy_heap | PR | 8.170 ns | 0.0310 ns | 1.00 |
BulkCopy_stack | Main | 8.439 ns | 0.0109 ns | 1.00 |
BulkCopy_stack | PR | 8.578 ns | 0.0201 ns | 1.02 |
@EgorBot -arm64 -pr 107437 using BenchmarkDotNet.Attributes;
using System;
using System.Runtime.CompilerServices;
public class Proga
{
static object[] test1 = [null, null, null];
static object[] test2 = [null, null, null];
static object val = null;
[Benchmark]
public void StelemRef()
{
test1[0] = val;
test1[1] = val;
test1[2] = val;
}
[Benchmark]
public void BulkCopy_heap()
{
test1.AsSpan().CopyTo(test2);
}
[Benchmark]
public void BulkCopy_stack()
{
MyStruct ms = default;
Copy(ref ms, default);
}
[MethodImpl(MethodImplOptions.NoInlining)]
static void Copy(ref MyStruct dst, MyStruct src) => dst = src;
public record struct MyStruct(object o1, object o2, object o3, object o4);
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Processing dotnet/runtime#107437 (comment) command:
Command
-arm64 -intel
(EgorBot will reply in this issue)
The text was updated successfully, but these errors were encountered: