You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
upgrade cespare/xxhash from v1 to v2 which includes some performance changes (when working with the go complier) and assembly versions of Sum64
The Cache storer interface has a write method that wants a byte slice key, but the key is only ever read in all implementations. When engine.WriteMulti calls into the cache to write, it has a string key already but is converting it to a byte slice to do the write. This byte slice allocates when we don't need to if a string was used all the way down that call path. The ask is to change that to avoid unnecessary allocations. It will need a new getPartitionStringKey method like below. All the storer interface methods could be updated to use string keys instead of byte slices but the main value is in the write method as it is the most used.
philjb
changed the title
feat: upgrade cespare/xxhash to v2; refactor Cache.storer.write() to accept a string key instead of []byte
feat performance: upgrade cespare/xxhash to v2; refactor Cache.storer.write() to accept a string key instead of []byte
Dec 2, 2024
Tasks
write
method that wants a byte slice key, but the key is only ever read in all implementations. When engine.WriteMulti calls into the cache to write, it has a string key already but is converting it to a byte slice to do the write. This byte slice allocates when we don't need to if a string was used all the way down that call path. The ask is to change that to avoid unnecessary allocations. It will need a newgetPartitionStringKey
method like below. All the storer interface methods could be updated to use string keys instead of byte slices but the main value is in the write method as it is the most used.The text was updated successfully, but these errors were encountered: