dolthub/swiss

change struct define of `group` might be improve cpu cache hit

ahfuzhang opened this issue · 0 comments

see:

swiss/map.go

Line 42 in c0064a0

type group[K comparable, V any] struct {

We always need to use both key and value, so if we put key and value togother, it might be improve cpu cache hit.

So struct group define like this might be better:

type group[K comparable, V any] struct {
	items [groupSize]struct {
		key   K
		value V
	}
}