node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org ยป

calvin-map

Map

A simple ES6 map implimentation, hopefully performant, mainly for learning purposes.

Currently uses a linked list for storing the values, this is likely either very good or very bad performance wise.

For keys that are comparable by value (e.g. not objects), we use a dictionary to speed up lookup, the results for numbers when adding 10,000 values and when addding 100 values. In other words there is some overhead but it pays for itself.