Skip to content
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

Wrap contrib/check-whitespace.jl in a function #53468

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

giordano
Copy link
Contributor

@giordano giordano commented Feb 25, 2024

This doesn't affect much CI time as the job is vastly dominated by setup rather than performing the actual check, but locally you can enjoy a sensible speedup:

% hyperfine --warmup=1 'julia contrib/check-whitespace.jl' 'julia contrib/check-whitespace-new.jl'
Benchmark 1: julia contrib/check-whitespace.jl
  Time (mean ± σ):      2.143 s ±  0.015 s    [User: 2.880 s, System: 0.056 s]
  Range (min … max):    2.129 s …  2.170 s    10 runs

Benchmark 2: julia contrib/check-whitespace-new.jl
  Time (mean ± σ):      1.080 s ±  0.004 s    [User: 1.830 s, System: 0.050 s]
  Range (min … max):    1.075 s …  1.087 s    10 runs

Summary
  'julia contrib/check-whitespace-new.jl' ran
    1.98 ± 0.02 times faster than 'julia contrib/check-whitespace.jl'

Somewhat ironically, PR better reviewed by ignoring whitespaces.

@giordano
Copy link
Contributor Author

Note that performing the whitespace check took 4 seconds in this PR, while it took 9 seconds in the parent commit (b8a0a39), confirming the ~2x speedup for running the script.

@giordano giordano merged commit b18824a into JuliaLang:master Feb 26, 2024
8 checks passed
@giordano giordano deleted the mg/check-whitespace branch February 26, 2024 08:18
tecosaur pushed a commit to tecosaur/julia that referenced this pull request Mar 4, 2024
mkitti pushed a commit to mkitti/julia that referenced this pull request Mar 7, 2024
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.

None yet

2 participants