Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.
/ rhh Public archive

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

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