title: What's the fastest way to compare two arrays for equality?
body: <p>I have two arrays of objects which are likely to have the same values, but in a different order, e.g.</p>
  
  <pre><code>{ "cat", "dog", "mouse", "pangolin" }
  
  { "dog", "pangolin", "cat", "mouse" }
  </code></pre>
  
  <p>I wish to treat these two arrays as equal. What's the fastest way to test this?</p>