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 Read function is a static function. With some work to the underlying implementation (and avoid going through an io.Reader), we should be able to make it not escape the input.
Thus, you could do something like:
vararr [32]byterand.Read(arr[:])
and know that it doesn't allocate.
The text was updated successfully, but these errors were encountered:
Go version
go1.22
Output of
go env
in your module/workspace:What did you do?
Ran this benchmark:
What did you see happen?
What did you expect to see?
The
Read
function is a static function. With some work to the underlying implementation (and avoid going through anio.Reader
), we should be able to make it not escape the input.Thus, you could do something like:
and know that it doesn't allocate.
The text was updated successfully, but these errors were encountered: