Skip to content

EgorBot for EgorBo in #110923 #218

@EgorBot

Description

@EgorBot

Processing dotnet/runtime#110923 (comment) command:

Command

-amd -arm -profiler

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

public class Benchmark
{
    static Guid guid = Guid.Parse("{D420C46B-04DC-4ABD-BF32-5132E82EE7F7}");

    [Benchmark]
    public bool FormatX()
    {
        Span<char> buffer = stackalloc char[100];
        bool result = guid.TryFormat(buffer, out int charsWritten, "X");
        Consume(buffer.Slice(0, charsWritten));
        return result;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    static void Consume(Span<char> _){}
}

(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