There is a need to remove all duplicate elements from the array, but do not sort it. I implemented it in the forehead and simply rewrite each element of the array from the end to a new array and check the old one for the presence of the same element.
It seems everything works, but I thought about speed because This method should be very expensive and decided to check it on jsperf. To my surprise, the tests showed that my method wins the method I found in jquery (first sort the array, and then delete all the repetitions, walking the entire array).
But it seems to me that jsperf is somewhere wrong and for this I want to ask more experienced colleagues why such strange results are obtained: