Is SwiftSyntax actually faster?
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 19.7k
- Forks
- 2.3k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
We've been migrating rules to SwiftSyntax and oss-check usually reports that they're faster now, so I was curious about how much faster main is.
hyperfine --warmup 1 "swiftlint --quiet --no-cache" "portable_swiftlint/swiftlint --quiet --no-cache"
Benchmark 1: swiftlint --quiet --no-cache
Time (mean ± σ): 1.384 s ± 0.007 s [User: 6.289 s, System: 0.208 s]
Range (min … max): 1.371 s … 1.395 s 10 runs
Benchmark 2: portable_swiftlint/swiftlint --quiet --no-cache
Time (mean ± σ): 1.511 s ± 0.015 s [User: 7.253 s, System: 0.198 s]
Range (min … max): 1.490 s … 1.529 s 10 runs
Summary
'swiftlint --quiet --no-cache' ran
1.09 ± 0.01 times faster than 'portable_swiftlint/swiftlint --quiet --no-cache'
portable_swiftlintwas built usingmake portable_ziponmain.swiftlintwas installed with Homebrew and is `0.49.1- I run this on SwiftLint's repo
So 0.49.1 is ~10% faster than main. What am I missing? Maybe the SwiftLint repo is not a good example?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported hyperfine comparison between swiftlint --quiet --no-cache and portable_swiftlint/swiftlint --quiet --no-cache on the SwiftLint repository. Review how make portable_zip builds the portable binary and compare it with Homebrew SwiftLint 0.49.1; done means explaining the roughly 10% performance difference or identifying the benchmark issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- performance, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100