array-unique (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script src="https://cdn.rawgit.com/lodash/lodash/3.1.0/lodash.js"></script>
<script>
var _2 = _.runInContext({ 'Set': null });
</script>

Setup

var objects = _.times(500, function() { return {}; });
    var array = _.shuffle(objects.concat(objects));

Test runner

Ready to run.

Testing in
TestOps/sec
with Set
var r = _.uniq(array);
ready
without Set
var r = _2.uniq(array);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.