Compares SugarJS and arr. unions and intersections on two arrays of dimensions labeled over buttons.
Arrays has random values of different types.
Results and timing are shown on console so open it for details.



Test on numbers and strings only, if unchecked all types are used.

It's iteration 4, previous:
-- ermouth.com/fastArray/
-- ermouth.com/fastArray/i1.html
-- ermouth.com/fastArray/i1.html.

Now code extends Array with .fastUnion(), .fastIntersect() and .fastUnique().
11Mb test json incorporated -- press the rightmost button. Sample arrays of json nodes are curly and full of text leaves.
Performance of this version is nearly same to Sugar 1.2 only in rear cases -- on long text jsons in Google Chrome, Safari and IE 9.
In any other browser fastArray twice or more faster. And much, much, much more faster on long arrays.
And it's about 2100 bytes minified.

Yours, ermouth
2012-03-17