Skip to content

Fix URL.Template benchmark variable initialization #1289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
(151038900) Fix URL.Template benchmark variable initialization
  • Loading branch information
jrflat committed May 9, 2025
commit d26da809f6b40b10e936075a17dbd9e5b0b65127
32 changes: 16 additions & 16 deletions Benchmarks/Benchmarks/URL/BenchmarkURL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -248,26 +248,26 @@ let benchmarks = {
]

var variables: [URL.Template.VariableName: URL.Template.Value] = [
"count": ["one", "two", "three"],
"dom": ["example", "com"],
"dub": "me/too",
"hello": "Hello World!",
"half": "50%",
"var": "value",
"who": "fred",
"base": "http://example.com/home/",
"path": "/foo/bar",
"list": ["red", "green", "blue"],
"keys": [
.init("count"): ["one", "two", "three"],
.init("dom"): ["example", "com"],
.init("dub"): "me/too",
.init("hello"): "Hello World!",
.init("half"): "50%",
.init("var"): "value",
.init("who"): "fred",
.init("base"): "http://example.com/home/",
.init("path"): "/foo/bar",
.init("list"): ["red", "green", "blue"],
.init("keys"): [
"semi": ";",
"dot": ".",
"comma": ",",
],
"v": "6",
"x": "1024",
"y": "768",
"empty": "",
"empty_keys": [:],
.init("v"): "6",
.init("x"): "1024",
.init("y"): "768",
.init("empty"): "",
.init("empty_keys"): [:],
]

Benchmark("URL-Template-expansion") { benchmark in
Expand Down