angular/angular.dart — pull request #1208 by markovuksanovic (2014-07-07 13:24:22+00:00)
Title: [WIP]: MicroMap

An implementation of the Map which initially uses array and after a number of elements is inserted switches to a HashMap implementation.

MicroMap is intended to be used when one expects that the number of elements will be quite low. In this setting it's better to use an array and use linear search to locate elements rather then using the actual HashMap. After a certain number of elements have been inserted HashMap will perform better then array and linear search.

Worst case scenario will be when the number of elements keeps oscillating around threshold value which will cause the map to keep switching from array to HashMap (and vice versa). Switching form array to hashMap and the other way around is an expensive operation.