@@ -152,7 +152,7 @@ GolangCI-Lint was created to fix the following issues with `gometalinter`:
152
152
1 . Slow work: ` gometalinter ` usually works for minutes in average projects.
153
153
** GolangCI-Lint works [ 2-7x times faster] ( #performance ) ** by [ reusing work] ( #internals ) .
154
154
2 . Huge memory consumption: parallel linters don't share the same program representation and can consume
155
- ` n ` times more memory (` n ` - concurrency). GolangCI-Lint fixes it by sharing representation and ** consumes 1.35x less memory** .
155
+ ` n ` times more memory (` n ` - concurrency). GolangCI-Lint fixes it by sharing representation and ** consumes 26% less memory** .
156
156
3 . Doesn't use real bounded concurrency: if you set it to ` n ` it can take up to ` n*n ` threads because of
157
157
forced threads in specific linters. ` gometalinter ` can't do anything about it because it runs linters as
158
158
black boxes in forked processes. In GolangCI-Lint we run all linters in one process and completely control
@@ -202,20 +202,20 @@ $ gometalinter --deadline=30m --vendor --cyclo-over=30 --dupl-threshold=150 \
202
202
203
203
| Repository | GolangCI Time | GolangCI Is Faster than Gometalinter | GolangCI Memory | GolangCI eats less memory than Gometalinter |
204
204
| ---------- | ------------- | ------------------------------------ | --------------- | ------------------------------------------- |
205
- | gometalinter repo, 4 kLoC | 6s | ** 6.4x** | 0.7GB | 1.5x |
206
- | self-repo, 4 kLoC | 12s | ** 7.5x** | 1.2GB | 1.7x |
207
- | beego, 50 kLoC | 10s | ** 4.2x** | 1.4GB | 1.1x |
208
- | hugo, 70 kLoC | 15s | ** 6.1x** | 1.6GB | 1.8x |
209
- | consul, 127 kLoC | 58s | ** 4x** | 2.7GB | 1.7x |
210
- | terraform, 190 kLoC | 2m13s | ** 1.6x** | 4.8GB | 1x |
211
- | go-ethereum, 250 kLoC | 33s | ** 5x** | 3.6GB | 1x |
212
- | go source (` $GOROOT/src ` ), 1300 kLoC | 2m45s | ** 2x** | 4.7GB | 1x |
205
+ | gometalinter repo, 4 kLoC | 6s | ** 6.4x** | 0.7GB | 33% |
206
+ | self-repo, 4 kLoC | 12s | ** 7.5x** | 1.2GB | 41% |
207
+ | beego, 50 kLoC | 10s | ** 4.2x** | 1.4GB | 9% |
208
+ | hugo, 70 kLoC | 15s | ** 6.1x** | 1.6GB | 44% |
209
+ | consul, 127 kLoC | 58s | ** 4x** | 2.7GB | 41% |
210
+ | terraform, 190 kLoC | 2m13s | ** 1.6x** | 4.8GB | 0% |
211
+ | go-ethereum, 250 kLoC | 33s | ** 5x** | 3.6GB | 0% |
212
+ | go source (` $GOROOT/src ` ), 1300 kLoC | 2m45s | ** 2x** | 4.7GB | 0% |
213
213
214
214
215
215
** On average golangci-lint is 4.6 times faster** than gometalinter. Maximum difference is in the
216
216
self-repo: ** 7.5 times faster** , minimum difference is in terraform source code repo: 1.8 times faster.
217
217
218
- On average golangci-lint consumes 1.35 times less memory.
218
+ On average golangci-lint consumes 26% less memory.
219
219
220
220
## Why golangci-lint is faster
221
221
0 commit comments