Skip to content

Benchmarks for #121309 (xtqqczze) #538

@EgorBot

Description

@EgorBot

Processing dotnet/runtime#121309 (comment) command:

Command

-amd -intel

using System;
using System.Net;
using BenchmarkDotNet.Attributes;

public class IPv4_u16_Benchmarks
{
    public IEnumerable<string> Data() => [
        new string('A', 64),
        "HelloWorld1234567890"
    ];

    [Benchmark]
    [ArgumentsSource(nameof(Data))]
    public bool M(string s)
    {
        for (int i = 0; i < s.Length; i++)
        {
            char ch = s[i];
            if (!char.IsAsciiLetterOrDigit(ch))
                return false;
        }
        return true;
    }
}

(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