Skip to content

EgorBot for AndyAyersMS in #109237 #136

@EgorBot

Description

@EgorBot

Processing dotnet/runtime#109237 (comment) command:

Command
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System.Runtime.CompilerServices;

BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);

public class Bench
{
    static int[] s_array = new int[512];
    [Benchmark]
    public int Test() 
    {
        IEnumerable<int> e = s_array;
        int sum = 0;
        foreach (int i in e) sum += i;
        return sum;
    }
}

(EgorBot will reply in this issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions