parent
28e69d7fb4
commit
bb1aa352aa
4
pmap.go
4
pmap.go
|
@ -11,8 +11,8 @@ const (
|
|||
nodeMask = 0b1111
|
||||
)
|
||||
|
||||
type Key = interface{}
|
||||
type Value = interface{}
|
||||
type Key = int
|
||||
type Value = int
|
||||
|
||||
type Map interface {
|
||||
Get(Key) (Value, bool)
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
func hash(k Key) uint32 {
|
||||
//u := uint(k.(int))*6364136223846793005 + 1
|
||||
//return uint32(u >> 32)
|
||||
u := uint(k.(int))
|
||||
u := uint(k) //u := uint(k.(int))
|
||||
return uint32(u + u>>32)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue