title: what is faster hashset clear or new hashset?
body: <p>assuming I have defined a <code>HashSet&lt;String&gt; set</code>.<br>
  What is better in terms of performance:</p>
  
  <pre><code>set.clear;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>set = new HashSet&lt;String&gt;();
  </code></pre>
  
  <p>EDIT: the reason I am checking this is that currently my code has the second option, but I want to change it to the first one to make the Set <code>final</code>.</p>