You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example code; causes an issue with hashmaps with large data sets.
Width is set to 53, because large hashmaps contain significant low-order bytes, and we are attempting to use 64-bit hashes.
src := rand.NewSource(time.Now().UnixNano())
random := rand.New(src)
width := uint32(64 - 11)
max := int64(math.Pow(2.0, float64(width)))
count := uint64(8)
contents := make([]uint64, count)
for i := uint64(0); i < count; i++ {
contents[i] = uint64(random.Int63n(max))
}
m := AllocateMemories(LargeBlock, width, 8)
for k, v := range contents {
m.Assign(uint64(k), v)
}
for k, v := range contents {
result := m.Read(uint64(k))
if result != v {
t.Fatalf("At %d\nexpected %064b\nreceived %064b\n", k, v, result)
}
}
The text was updated successfully, but these errors were encountered:
Example code; causes an issue with hashmaps with large data sets.
Width is set to 53, because large hashmaps contain significant low-order bytes, and we are attempting to use 64-bit hashes.
The text was updated successfully, but these errors were encountered: