Don't allocate memory in hashKey

Converting from string to []byte allocates a temporary slice.  If we
iterate the string's runes directly, we can avoid the extra memory
allocations.  This dramatically improves hash performance and
therefore Set and Delete performance in micro benchmarks.
1 file changed
tree: 5fc506df22efba2757ca8afbb196d958875312bc
  1. LICENSE
  2. list.go
  3. list_test.go
  4. map.go
  5. map_test.go
  6. profile.sh
  7. README.md
README.md

ps

Persistent data structures for Go. See the full package documentation

Install with

go get github.com/mndrix/ps