realm / realm/SwiftLint

Is SwiftSyntax actually faster?

Open
#4,261 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Swift
Stars
19.7k
Forks
2.3k
Avg merge
1d 1h
Merged PRs (30d)
11

Description

New Issue Checklist

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_swiftlint was built using make portable_zip on main.
  • swiftlint was 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.