Hi, nice sum-up of different duplicate filters!
I used your tests (http://jsben.ch/ziS3i) and found that directly using the array (given in the condition) of the Filter option is even faster. Consider this usage:
array.filter((item, index, arr) => arr.indexOf(item) === index);
It went from 47-ish% to 42-ish% on that test site.
Strangely enough I noticed something odd. When using the Filter approach this way:
array.filter((item, index, arr) => array.indexOf(item) === index);
It also seems faster, by that same margin. However we only reference to the array through the condition, we don’t actually use it, we still use the
const array one.
Disclaimer: iMac 10.14 — Chrome, small collection ([1,2,3,4,2,3,4,2,3,4,5,6,7,6,7,6,7,8,9]), did not test these findings outside