_.without vs .filter (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.6/underscore-min.js"></script>

Setup

const array = Array.from({ length: 100 }, (_, index) => index);

Test runner

Ready to run.

Testing in
TestOps/sec
_.without
_.without(array, 49);
ready
.filter
array.filter(item => item !== 49);
ready

Revisions

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