ivaynberg/select2 — pull request #1107 by sebmarion (2013-03-27 22:19:26+00:00)
Title: Faster checks for unique item in array

This code uses a simple loop to check if a value is part of an array, as opposed to indexOf which is a lot slower (at least on Chrome).

See performance tests at:
http://jsperf.com/jquery-inarray-vs-underscore-indexof/4