-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: parallelize stat collection with rayon
By collecting individual user stats in parallel, we dramatically speed up the time it takes to get stats on repositories with large histories. ``` ❯ hyperfine 'git-stats-old HEAD' 'git-stats-new HEAD' Benchmark 1: git-stats-old HEAD Time (mean ± σ): 6.141 s ± 0.017 s [User: 5.652 s, System: 0.509 s] Range (min … max): 6.120 s … 6.168 s 10 runs Benchmark 2: git-stats-new HEAD Time (mean ± σ): 772.7 ms ± 57.5 ms [User: 8142.8 ms, System: 742.6 ms] Range (min … max): 723.5 ms … 859.2 ms 10 runs Summary 'git-stats-new HEAD' ran 7.95 ± 0.59 times faster than 'git-stats-old HEAD' ```
- Loading branch information
Showing
3 changed files
with
150 additions
and
41 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters