Skip to content

lvn/gash

Repository files navigation

Gash

Gash is a simple Go hashmap library, containing a few implementations of various types of hashmaps.

Quickstart

package main

import (
    "fmt"
    "github.com/elvinyung/gash"
)

func main() {
    t := gash.CreateSimpleHash(1000, gash.Djb2)
    t.Insert("foo", 4)
    t.Insert("bar", "asdfofsdja")
    t.Insert("baz", []int{1,2,3})
    fmt.Println(t.Find("foo"))
    fmt.Println(t.Find("bar"))
    fmt.Println(t.Find("baz"))
}

Other stuff

Checklist:

  • chain (simple) hash
  • closed hash
  • cuckoo hash
  • double hash
  • coalesced hash
  • some sort of hash set
  • some sort of bloom filter

About

Hashmap implementations in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages