MCPcopy
hub / github.com/cornelk/hashmap / New

Function New

hashmap.go:24–26  ·  view source on GitHub ↗

New returns a new map instance.

()

Source from the content-addressed store, hash-verified

22
23// New returns a new map instance.
24func New[Key hashable, Value any]() *Map[Key, Value] {
25 return NewSized[Key, Value](defaultSize)
26}
27
28// NewSized returns a new map instance with a specific initialization size.
29func NewSized[Key hashable, Value any](size uintptr) *Map[Key, Value] {

Callers 15

setupHashMapFunction · 0.92
setupHashMapStringFunction · 0.92
TestHashCollisionFunction · 0.85
TestAliasTypeSupportFunction · 0.85
TestNewFunction · 0.85
TestSetStringFunction · 0.85
TestSetUint8Function · 0.85
TestSetInt16Function · 0.85
TestSetFloat32Function · 0.85
TestSetFloat64Function · 0.85
TestSetInt64Function · 0.85

Calls

no outgoing calls

Tested by 15

setupHashMapFunction · 0.74
setupHashMapStringFunction · 0.74
TestHashCollisionFunction · 0.68
TestAliasTypeSupportFunction · 0.68
TestNewFunction · 0.68
TestSetStringFunction · 0.68
TestSetUint8Function · 0.68
TestSetInt16Function · 0.68
TestSetFloat32Function · 0.68
TestSetFloat64Function · 0.68
TestSetInt64Function · 0.68