fastmap

package module
v0.0.0-...-cb4b570 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2023 License: BSD-2-Clause Imports: 4 Imported by: 0

README

go-fastmap

An attemt to create something faster than sync.Map or map with mutex in single-thread and concurrent use cases

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithLoadFactor

func WithLoadFactor(lf float32) func(m *FastMap)

func WithSize

func WithSize(size uint64) func(m *FastMap)

Types

type FastMap

type FastMap struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...SetOption) *FastMap

func (*FastMap) Delete

func (m *FastMap) Delete(key string)

func (*FastMap) Get

func (m *FastMap) Get(key string) (interface{}, bool)

func (*FastMap) Len

func (m *FastMap) Len() uint64

func (*FastMap) Set

func (m *FastMap) Set(key string, value interface{})

type SetOption

type SetOption func(m *FastMap)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL