times that have lead to discussion[1][2][3] without a standard solution,
I've implemented[4] an entirely off-heap hash-table in Go. It uses a simple
Malloc()/Free() implementation based on mmap (gommap) to obtain memory
directly from the OS. It could just as easily use malloc from the C
runtime in you want use CGO, but the current implementation avoids that in
favor of an entirely Go-based solution for ease of "go get
github.com/glycerine/go-offheap-hashtable".
This off-heap hash table is based on a simple open-addressing with
linear-probing and the speedy xxhash64 hash function[5]. The implementation
was inspired by Jeff Preshing's blog article where he shows that such a
strategy can best even the highly cache-tuned Judy array[6].
See here:
https://github.com/glycerine/go-offheap-hashtable
-Jason
[1] https://github.com/golang/go/issues/9477
[2] https://groups.google.com/d/msg/golang-nuts/kCQP6S6ZGh0/JEuY3A8xEygJ
[3] https://groups.google.com/d/msg/golang-nuts/cmpiArv10f4/UQZ39bLaYpQJ
[4] https://github.com/glycerine/go-offheap-hashtable
[5] https://github.com/OneOfOne/xxhash
[6] http://preshing.com/20130107/this-hash-table-is-faster-than-a-judy-array/
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.