title: Optimizing ArrayList.removeAll
body: <p>A lot of people have said that <code>ArrayList.removeAll</code> is really slow with large size arrays. </p>
  
  <p>This <a href="http://www.ahmadsoft.org/articles/removeall/index.html">article</a> provides two optimized solutions to the ArrayList.removeAll speed, but requires implementing them in the class itself, and cannot be used externally as a fix. </p>
  
  <p>Is there any way to apply this sort of fix short of copying the ArrayList source code and using my own version of it? </p>
  
  <p>Edit: I suppose I should add my need for this, as there is probably a way to do what I want without ArrayList.removeAll.</p>
  
  <p>I have two lists of around <code>70,000 longs</code> each. They are almost identical, but one list has a few more numbers that the second list doesn't have, and I want to find them. The only way I know to find them is to do <code>first.removeAll(second)</code> to find the difference. Is there another way?</p>