- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1
Open
Description
Processing dotnet/runtime#118425 (comment) command:
Command
-arm -amd -intel
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);
[MemoryDiagnoser(false)]
public class Bench
{
    [Benchmark]
    [ArgumentsSource(nameof(GetLists))]
    public int SumList(List<int> list)
    {
        int sum = 0;
        foreach (int item in list)
        {
            sum += item;
        }
        return sum;
    }
    [Benchmark]
    [ArgumentsSource(nameof(GetLists))]
    public int SumEnumerable(IEnumerable<int> list)
    {
        int sum = 0;
        foreach (int item in list)
        {
            sum += item;
        }
        return sum;
    }
    public static IEnumerable<List<int>> GetLists() =>
        from count in new int[] { 1, 10, 1_000 }
        select Enumerable.Range(0, count).ToList();
}(EgorBot will reply in this issue)
Metadata
Metadata
Assignees
Labels
No labels