Skip to content

EgorBot for EgorBo in #111564 #296

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

Open
EgorBot opened this issue Feb 16, 2025 · 3 comments
Open

EgorBot for EgorBo in #111564 #296

EgorBot opened this issue Feb 16, 2025 · 3 comments

Comments

@EgorBot
Copy link
Owner

EgorBot commented Feb 16, 2025

Processing dotnet/runtime#111564 (comment) command:

Command

-intel --envvars DOTNET_EnableAVX:0

using System.Collections;
using BenchmarkDotNet.Attributes;

public class Benchmarks
{
    bool[] buffer = new bool[1000];

    [Benchmark]
    [ArgumentsSource(nameof(TestData))]
    public void BitArrayCopyTo(BitArray bitArray) => bitArray.CopyTo(buffer, 0);

    public IEnumerable<BitArray> TestData()
    {
        yield return new BitArray(31);
        yield return new BitArray(32);
        yield return new BitArray(33);
        yield return new BitArray(64);
        yield return new BitArray(127);
        yield return new BitArray(128);
        yield return new BitArray(129);
        yield return new BitArray(256);
    }
}

(EgorBot will reply in this issue)

@EgorBot
Copy link
Owner Author

EgorBot commented Feb 16, 2025

Benchmark results on linux_azure_cascadelake

BenchmarkDotNet v0.14.0, Ubuntu 24.04.1 LTS (Noble Numbat)
Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores
  Job-RYRZNO : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT SSE4.2
  Job-SCDOVF : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT SSE4.2
EnvironmentVariables=DOTNET_EnableAVX=0
Method Toolchain bitArray Mean Error Ratio
BitArrayCopyTo Main Syste(...)Array [27] 28.767 ns 0.0185 ns 1.00
BitArrayCopyTo Main Syste(...)Array [27] 29.831 ns 0.0070 ns 1.04
BitArrayCopyTo Main Syste(...)Array [27] 30.699 ns 0.0109 ns 1.07
BitArrayCopyTo Main Syste(...)Array [27] 56.888 ns 0.0120 ns 1.98
BitArrayCopyTo Main Syste(...)Array [27] 113.207 ns 0.0199 ns 3.94
BitArrayCopyTo Main Syste(...)Array [27] 7.712 ns 0.0204 ns 0.27
BitArrayCopyTo Main Syste(...)Array [27] 8.555 ns 0.0086 ns 0.30
BitArrayCopyTo Main Syste(...)Array [27] 12.015 ns 0.0035 ns 0.42
BitArrayCopyTo PR Syste(...)Array [27] 29.083 ns 0.0103 ns 1.01
BitArrayCopyTo PR Syste(...)Array [27] 3.948 ns 0.0032 ns 0.14
BitArrayCopyTo PR Syste(...)Array [27] 5.139 ns 0.0152 ns 0.18
BitArrayCopyTo PR Syste(...)Array [27] 5.240 ns 0.0004 ns 0.18
BitArrayCopyTo PR Syste(...)Array [27] 33.575 ns 0.0095 ns 1.17
BitArrayCopyTo PR Syste(...)Array [27] 8.361 ns 0.0050 ns 0.29
BitArrayCopyTo PR Syste(...)Array [27] 8.924 ns 0.0408 ns 0.31
BitArrayCopyTo PR Syste(...)Array [27] 12.207 ns 0.2609 ns 0.42

BDN_Artifacts.zip

cc @EgorBo (agent_logs.txt). EgorBot manual: link.

@EgorBo
Copy link

EgorBo commented Feb 16, 2025

@EgorBot -intel -pr 111564 --envvars DOTNET_EnableAVX:0

using System.Collections;
using BenchmarkDotNet.Attributes;

public class Benchmarks
{
    bool[] buffer = new bool[1000];

    [Benchmark]
    [ArgumentsSource(nameof(TestData))]
    public void BitArrayCopyTo(BitArray bitArray, int len /* for BDN reporting*/) 
        => bitArray.CopyTo(buffer, 0);

    public IEnumerable<object[]> TestData()
    {
        yield return [new BitArray(31), 31];
        yield return [new BitArray(32), 32];
        yield return [new BitArray(33), 33];
        yield return [new BitArray(64), 64];
        yield return [new BitArray(127), 127];
        yield return [new BitArray(128), 128];
        yield return [new BitArray(129), 129];
        yield return [new BitArray(256), 256];
    }
}

@EgorBot
Copy link
Owner Author

EgorBot commented Feb 16, 2025

Benchmark results on linux_azure_cascadelake

BenchmarkDotNet v0.14.0, Ubuntu 24.04.1 LTS (Noble Numbat)
Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores
  Job-VGGOZV : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT SSE4.2
  Job-ZAUWTF : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT SSE4.2
EnvironmentVariables=DOTNET_EnableAVX=0
Method Toolchain bitArray len Mean Error Ratio
BitArrayCopyTo Main Syste(...)Array [27] 31 29.486 ns 0.0223 ns 1.00
BitArrayCopyTo PR Syste(...)Array [27] 31 29.474 ns 0.0080 ns 1.00
BitArrayCopyTo Main Syste(...)Array [27] 32 30.318 ns 0.0106 ns 1.00
BitArrayCopyTo PR Syste(...)Array [27] 32 4.127 ns 0.0069 ns 0.14
BitArrayCopyTo Main Syste(...)Array [27] 33 31.181 ns 0.0078 ns 1.00
BitArrayCopyTo PR Syste(...)Array [27] 33 5.541 ns 0.0209 ns 0.18
BitArrayCopyTo Main Syste(...)Array [27] 64 57.695 ns 0.0123 ns 1.00
BitArrayCopyTo PR Syste(...)Array [27] 64 5.698 ns 0.0415 ns 0.10
BitArrayCopyTo Main Syste(...)Array [27] 127 112.872 ns 0.5945 ns 1.00
BitArrayCopyTo PR Syste(...)Array [27] 127 33.487 ns 0.0070 ns 0.30
BitArrayCopyTo Main Syste(...)Array [27] 128 8.122 ns 0.0136 ns 1.00
BitArrayCopyTo PR Syste(...)Array [27] 128 8.286 ns 0.0191 ns 1.02
BitArrayCopyTo Main Syste(...)Array [27] 129 9.324 ns 0.0072 ns 1.00
BitArrayCopyTo PR Syste(...)Array [27] 129 9.072 ns 0.0212 ns 0.97
BitArrayCopyTo Main Syste(...)Array [27] 256 12.652 ns 0.0023 ns 1.00
BitArrayCopyTo PR Syste(...)Array [27] 256 12.449 ns 0.0032 ns 0.98

BDN_Artifacts.zip

cc @EgorBo (agent_logs.txt). EgorBot manual: link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants