tile38/vendor/github.com/tidwall/rhh
tidwall 3ed048242e Various updates
- Updated all dependencies
- Updated geoindex Box api
2021-02-03 14:30:55 -07:00
..
LICENSE Refactor repository and build scripts 2019-11-18 10:33:15 -07:00
README.md Refactor repository and build scripts 2019-11-18 10:33:15 -07:00
go.mod Various updates 2021-02-03 14:30:55 -07:00
go.sum Various updates 2021-02-03 14:30:55 -07:00
map.go Refactor repository and build scripts 2019-11-18 10:33:15 -07:00
u64.go Refactor repository and build scripts 2019-11-18 10:33:15 -07:00

README.md

rhh (Robin Hood Hashmap)

GoDoc

A simple and efficient hashmap package for Go using the xxhash algorithm, open addressing, and robin hood hashing.

This is an alternative to the standard Go map.

Getting Started

Installing

To start using rhh, install Go and run go get:

$ go get -u github.com/tidwall/rhh

This will retrieve the library.

Usage

The Map type works similar to a standard Go map, and includes four methods: Set, Get, Delete, Len.

var m rhh.Map
m.Set("Hello", "Dolly!")
val, _ := m.Get("Hello")
fmt.Printf("%v\n", val)
val, _ = m.Delete("Hello")
fmt.Printf("%v\n", val)
val, _ = m.Get("Hello")
fmt.Printf("%v\n", val)

// Output:
// Dolly!
// Dolly!
// <nil>

Contact

Josh Baker @tidwall

License

rhh source code is available under the MIT License.