Skip to content

Commit 8156b9f

Browse files
committed
Closes #104: improve readability of memory comparison
1 parent 069e66a commit 8156b9f

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ GolangCI-Lint was created to fix the following issues with `gometalinter`:
152152
1. Slow work: `gometalinter` usually works for minutes in average projects.
153153
**GolangCI-Lint works [2-7x times faster](#performance)** by [reusing work](#internals).
154154
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**.
156156
3. Doesn't use real bounded concurrency: if you set it to `n` it can take up to `n*n` threads because of
157157
forced threads in specific linters. `gometalinter` can't do anything about it because it runs linters as
158158
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 \
202202

203203
| Repository | GolangCI Time | GolangCI Is Faster than Gometalinter | GolangCI Memory | GolangCI eats less memory than Gometalinter |
204204
| ---------- | ------------- | ------------------------------------ | --------------- | ------------------------------------------- |
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% |
213213

214214

215215
**On average golangci-lint is 4.6 times faster** than gometalinter. Maximum difference is in the
216216
self-repo: **7.5 times faster**, minimum difference is in terraform source code repo: 1.8 times faster.
217217

218-
On average golangci-lint consumes 1.35 times less memory.
218+
On average golangci-lint consumes 26% less memory.
219219

220220
## Why golangci-lint is faster
221221

README.tmpl.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ GolangCI-Lint was created to fix the following issues with `gometalinter`:
125125
1. Slow work: `gometalinter` usually works for minutes in average projects.
126126
**GolangCI-Lint works [2-7x times faster](#performance)** by [reusing work](#internals).
127127
2. Huge memory consumption: parallel linters don't share the same program representation and can consume
128-
`n` times more memory (`n` - concurrency). GolangCI-Lint fixes it by sharing representation and **consumes 1.35x less memory**.
128+
`n` times more memory (`n` - concurrency). GolangCI-Lint fixes it by sharing representation and **consumes 26% less memory**.
129129
3. Doesn't use real bounded concurrency: if you set it to `n` it can take up to `n*n` threads because of
130130
forced threads in specific linters. `gometalinter` can't do anything about it because it runs linters as
131131
black boxes in forked processes. In GolangCI-Lint we run all linters in one process and completely control
@@ -175,20 +175,20 @@ $ gometalinter --deadline=30m --vendor --cyclo-over=30 --dupl-threshold=150 \
175175

176176
| Repository | GolangCI Time | GolangCI Is Faster than Gometalinter | GolangCI Memory | GolangCI eats less memory than Gometalinter |
177177
| ---------- | ------------- | ------------------------------------ | --------------- | ------------------------------------------- |
178-
| gometalinter repo, 4 kLoC | 6s | **6.4x** | 0.7GB | 1.5x |
179-
| self-repo, 4 kLoC | 12s | **7.5x** | 1.2GB | 1.7x |
180-
| beego, 50 kLoC | 10s | **4.2x** | 1.4GB | 1.1x |
181-
| hugo, 70 kLoC | 15s | **6.1x** | 1.6GB | 1.8x |
182-
| consul, 127 kLoC | 58s | **4x** | 2.7GB | 1.7x |
183-
| terraform, 190 kLoC | 2m13s | **1.6x** | 4.8GB | 1x |
184-
| go-ethereum, 250 kLoC | 33s | **5x** | 3.6GB | 1x |
185-
| go source (`$GOROOT/src`), 1300 kLoC | 2m45s | **2x** | 4.7GB | 1x |
178+
| gometalinter repo, 4 kLoC | 6s | **6.4x** | 0.7GB | 33% |
179+
| self-repo, 4 kLoC | 12s | **7.5x** | 1.2GB | 41% |
180+
| beego, 50 kLoC | 10s | **4.2x** | 1.4GB | 9% |
181+
| hugo, 70 kLoC | 15s | **6.1x** | 1.6GB | 44% |
182+
| consul, 127 kLoC | 58s | **4x** | 2.7GB | 41% |
183+
| terraform, 190 kLoC | 2m13s | **1.6x** | 4.8GB | 0% |
184+
| go-ethereum, 250 kLoC | 33s | **5x** | 3.6GB | 0% |
185+
| go source (`$GOROOT/src`), 1300 kLoC | 2m45s | **2x** | 4.7GB | 0% |
186186

187187

188188
**On average golangci-lint is 4.6 times faster** than gometalinter. Maximum difference is in the
189189
self-repo: **7.5 times faster**, minimum difference is in terraform source code repo: 1.8 times faster.
190190

191-
On average golangci-lint consumes 1.35 times less memory.
191+
On average golangci-lint consumes 26% less memory.
192192

193193
## Why golangci-lint is faster
194194

0 commit comments

Comments
 (0)