Skip to content

Improve benchmark harness and compare Swift 6.3 performance#24

Merged
gh123man merged 5 commits into
mainfrom
codex/benchmark-swift-6.3
Mar 27, 2026
Merged

Improve benchmark harness and compare Swift 6.3 performance#24
gh123man merged 5 commits into
mainfrom
codex/benchmark-swift-6.3

Conversation

@gh123man
Copy link
Copy Markdown
Owner

Summary

  • replace the benchmark executable with a configurable harness that supports warmups, configurable workloads, and markdown or JSON output
  • add helper scripts to run the suite per toolchain and compare two benchmark reports
  • document the benchmark workflow and ignore local benchmark result files

Benchmark findings

Full release benchmark runs were collected on the same machine with 1 warmup round and 5 measured rounds for each toolchain.

AsyncChannels vs Swift 6.2.3:

  • 47 of 48 scenarios improved on Swift 6.3.0
  • geometric-mean runtime change: about -37.7%
  • only regression observed: MPMC Buffered(100) | Int at +0.92%

Largest AsyncChannels wins:

  • MPSC Buffered(100) | RefData: -68.81%
  • SPMC Buffered(100) | RefData: -57.98%
  • MPSC Write Contention Buffered(100) | RefData: -54.79%
  • SPSC | String: -52.82%
  • MPSC | ValueData: -50.81%

AsyncAlgorithms also improved materially under Swift 6.3.0, with a geometric-mean runtime change of about -32.9% on the comparable scenarios.

Raw outputs

  • Benchmarks/results/swift-6.2.3-20260326-185306.json
  • Benchmarks/results/swift-6.3.0-20260326-191022.json

Reproduction

  • BENCHMARK_NAME=swift-6.2.3 Benchmarks/run_swift_benchmarks.sh
  • BENCHMARK_NAME=swift-6.3.0 SWIFT_BIN=$HOME/.swiftly/bin/swift Benchmarks/run_swift_benchmarks.sh
  • Benchmarks/compare_swift_benchmarks.py <baseline.json> <candidate.json>

@gh123man gh123man merged commit 0fed3c0 into main Mar 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant