Skip to content
/ rhh Public
forked from tidwall/rhh

A simple and efficient hashmap package for Go. Uses open addressing, Robin Hood hashing, and xxhash algorithm.

License

Notifications You must be signed in to change notification settings

Djarvur/rhh

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project has been archived. Please check out tidwall/hashmap for a fitter, happier, more productive hashmap library.

rhh

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 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

Source code is available under the MIT License.

About

A simple and efficient hashmap package for Go. Uses open addressing, Robin Hood hashing, and xxhash algorithm.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%