Skip to content

Conversation

beorn7
Copy link
Member

@beorn7 beorn7 commented Mar 4, 2015

sync.Pool is after all faster than the home-made free list. Especially
under contention. To prove that, this commit also adds a benchmark for
concurrent fingerprint calculation.

Benchmark results:
(Run with -cpu=1,2,4. x-y -> x goroutines with GOMAXPROCS=y.)

benchmark old ns/op new ns/op delta
BenchmarkMetricToFingerprintTripleConc4-4 320 138 -56.88%
BenchmarkMetricToFingerprintTripleConc8-4 314 141 -55.10%
BenchmarkMetricToFingerprintTripleConc4-2 344 264 -23.26%
BenchmarkMetricToFingerprintTripleConc2-4 331 256 -22.66%
BenchmarkMetricToFingerprintTripleConc8-2 338 263 -22.19%
BenchmarkMetricToFingerprintTripleConc1-4 599 505 -15.69%
BenchmarkMetricToFingerprintTripleConc4 553 493 -10.85%
BenchmarkMetricToFingerprintTripleConc2-2 327 292 -10.70%
BenchmarkMetricToFingerprintTripleConc8 554 496 -10.47%
BenchmarkMetricToFingerprintTripleConc2 555 501 -9.73%
BenchmarkMetricToFingerprintTripleConc1 554 509 -8.12%
BenchmarkMetricToFingerprintTripleConc1-2 551 513 -6.90%

@juliusv

bench-client-golang

beorn7 added 2 commits March 4, 2015 12:35
sync.Pool is after all faster than the home-made free list. Especially
under contention. To prove that, this commit also adds a benchmark for
concurrent fingerprint calculation.

Benchmark results:
(Run with -cpu=1,2,4. x-y -> x goroutines with GOMAXPROCS=y.)

benchmark                                     old ns/op     new ns/op     delta
BenchmarkMetricToFingerprintTripleConc4-4     320           138           -56.88%
BenchmarkMetricToFingerprintTripleConc8-4     314           141           -55.10%
BenchmarkMetricToFingerprintTripleConc4-2     344           264           -23.26%
BenchmarkMetricToFingerprintTripleConc2-4     331           256           -22.66%
BenchmarkMetricToFingerprintTripleConc8-2     338           263           -22.19%
BenchmarkMetricToFingerprintTripleConc1-4     599           505           -15.69%
BenchmarkMetricToFingerprintTripleConc4       553           493           -10.85%
BenchmarkMetricToFingerprintTripleConc2-2     327           292           -10.70%
BenchmarkMetricToFingerprintTripleConc8       554           496           -10.47%
BenchmarkMetricToFingerprintTripleConc2       555           501           -9.73%
BenchmarkMetricToFingerprintTripleConc1       554           509           -8.12%
BenchmarkMetricToFingerprintTripleConc1-2     551           513           -6.90%
@beorn7 beorn7 mentioned this pull request Mar 4, 2015
@juliusv
Copy link
Member

juliusv commented Mar 4, 2015

👍

beorn7 added a commit that referenced this pull request Mar 4, 2015
@beorn7 beorn7 merged commit b6416bc into master Mar 4, 2015
@brian-brazil brian-brazil deleted the beorn7/performance branch November 15, 2015 23:54
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.

2 participants