☰
orderedMap
orderedMap
§orderedMap(OK type :ordered orderedMap.OK, V type, ks array orderedMap.OK, vs array orderedMap.V) => orderedMap orderedMap.OK orderedMap.V:Map orderedMap.OK, orderedMap.V
§orderedMap(OK
type
:ordered orderedMap.OK, V type
, ks array orderedMap.OK, vs array orderedMap.V) =>
orderedMap orderedMap.OK orderedMap.V:
Map orderedMap.OK, orderedMap.Vadd mapping from k to v
create a string containing all mappings
entry is an index in ks/vs
get the value k is mapped to, or nil if none.
performance is O(log size).
performance is O(log size).
get an array of all key/value pairs in this map
a sorted array of entries of this map
Lookup performance is O(log size) since it uses binary search in a
sorted array. When deterministic performance is desired, an ordered map
should be preferred over a hash map.
performance of creation of the map is in O(n log n) where n is
keys.length.