Skip to content

Benchmarks for #121016 (EgorBo) #527

@EgorBot

Description

@EgorBot

Processing dotnet/runtime#121016 (comment) command:

Command

-intel -arm

using BenchmarkDotNet.Attributes;

public class UriParsingBenchmarks
{
    public static IEnumerable<string> GetTestData() => new[]
    {
        "https://alice:pa%24%24@例子.com/テスト",
        "https://bob%40dev:%F0%9F%92%[email protected]/💾/ファイル",
        "https://user:pwd%40key@пример.рф/данные/測試?mode=%E6%A4%9C%E8%A8%BC",
        "https://user:pa%24%[email protected]/路径/данные/資料",
        "https://data:tok3n@服务.cn/文件/📊/統計?state=%7B%22ok%22%3Atrue%2C%22v%22%3A%22%25done%25%22%7D",
        "https://token%3Auser:secr%25et@ドメイン.example/分析/データ/данные",
        "https://üser:päss@пример.com/страница/テスト?lang=日本語",
        "https://john:doe%21pass@δοκιμή.gr/δοκιμή/資料?ref=abc%25xyz",
        "https://账号:密码@例え.テスト/画像/файлы?タグ=猫%20写真",
        "https://x:y%25z@データ.jp/経路/данные/🧠/研究?city=Z%C3%BCrich&lang=%E6%97%A5%E6%9C%AC%E8%AA%9E"
    };

    // Baseline: construct a Uri
    [Benchmark(Baseline = true)]
    [ArgumentsSource(nameof(GetTestData))]
    public Uri NewUri(string uri) => new (uri);
}

(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