commit | 2ef2c356643239b4d42f03a5a95be2ebd7a026ef | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Thu Feb 01 12:34:01 2024 -0800 |
committer | Colin Cross <ccross@android.com> | Fri Feb 02 15:57:26 2024 -0800 |
tree | 154b7cc54ce4e1cf6c17c40679e9cd1d30ec90d4 | |
parent | dbf18bec9803687acd203f81b89c0d4a0f635958 [diff] |
Use WriteString in hashProviderInternal maphash.Hash implements WriteString, which avoids an allocation in order to convert the string to a byte slice. Using the concrete type instead of the io.Writer interface also allows int64Array to be allocated on the stack. Test: SOONG_PROFILE_MEM=/tmp/mem.pprof m nothing Change-Id: I5894f7399c2a232f5f67d7d0724a6115ba2c278f