// New returns a new Map with options
New returns a new Map with options
// New returns a new Map with options
func New(opts *Options) *Map {
	var initialSize int
	m := new(Map)
	if opts != nil {
		initialSize = opts.InitialSize
		m.shrinkable = opts.Shrinkable
		m.hashFn = opts.HashFn
		m.stable = opts.StableSeed
	}
	m.init = initialSize
	if initialSize <= 0 {
		initialSize = 1
	}
	var n = 1
	for n < initialSize {
		n *= 2
	}
	if m.stable == 0 {
		atomic.StoreUint32(&m.seed, makeSeed())
	} else {
		atomic.StoreUint32(&m.seed, m.stable)
	}
	m.entries = make([]entry, n)
	m.mask = len(m.entries) - 1
	return m
}
func New ( opts * Options ) * Map { var initialSize int m := new ( Map ) if opts != nil { initialSize = opts . InitialSize m . shrinkable = opts . Shrinkable m . hashFn = opts . HashFn m . stable = opts . StableSeed } m . init = initialSize if initialSize <= 0 { initialSize = 1 } var n = 1 for n < initialSize { n *= 2 } if m . stable == 0 { atomic . StoreUint32 ( & m . seed , makeSeed ( ) ) } else { atomic . StoreUint32 ( & m . seed , m . stable ) } m . entries = make ( [ ] entry , n ) m . mask = len ( m . entries ) - 1 return m }
New returns a new Map with options
New returns a new Map with options