mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 03:24:40 -07:00
cache padding for better performance, addresses #86
This commit is contained in:
@@ -26,11 +26,18 @@ type Sublist struct {
|
||||
stats stats
|
||||
}
|
||||
|
||||
// Use padding for better cache alignement when multiple goroutines
|
||||
// updating the stats.
|
||||
type stats struct {
|
||||
inserts uint64
|
||||
removes uint64
|
||||
_ [8]int64
|
||||
matches uint64
|
||||
_ [7]int64
|
||||
cacheHits uint64
|
||||
_ [7]int64
|
||||
inserts uint64
|
||||
_ [7]int64
|
||||
removes uint64
|
||||
_ [7]int64
|
||||
since time.Time
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user