perf: apply fieldalignement (#1284)

This commit is contained in:
Jason Cameron 2025-11-16 15:43:07 -05:00 committed by GitHub
parent da1890380e
commit 9dd4de6f1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 90 additions and 94 deletions

View file

@ -13,13 +13,13 @@ func Zilch[T any]() T {
// Impl is a lazy key->value map. It's a wrapper around a map and a mutex. If values exceed their time-to-live, they are pruned at Get time.
type Impl[K comparable, V any] struct {
data map[K]decayMapEntry[V]
lock sync.RWMutex
// deleteCh receives decay-deletion requests from readers.
deleteCh chan deleteReq[K]
// stopCh stops the background cleanup worker.
stopCh chan struct{}
wg sync.WaitGroup
lock sync.RWMutex
}
type decayMapEntry[V any] struct {