BetterMap

A faster implementation of a map using a list of LinearMaps and the built-in function hash() to determine which LinearMap to put each key into.

Methods

init

Appends (n) LinearMaps onto (self).

Parameters

namedescriptiondefault

self

n

100

find_map

Finds the right LinearMap for key (k).

Parameters

namedescriptiondefault

self

k

add

Adds a new item to the appropriate LinearMap for key (k).

Parameters

namedescriptiondefault

self

k

v

get

Finds the right LinearMap for key (k) and looks up (k) in it.

Parameters

namedescriptiondefault

self

k

Last updated