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
The text was updated successfully, but these errors were encountered:
azr
changed the title
Why copy string to empty byte slice instead of typecasting it ?
Why copy string to [64]byte slice instead of converting it ?
Sep 12, 2017
When you use [] byte (key) to convert a string to a byte slice, Go allocates memory for the new byte slice. This conversion can lead to high memory usage and possible performance problems in the case of high frequency calls. Using a fixed-size array (such as [64] byte) directly, you can reuse the same memory area, avoiding memory allocation on every call.
consistent/consistent.go
Lines 238 to 245 in 75142be
for performances reasons ?
( hi ! )
The text was updated successfully, but these errors were encountered: