Fastest way to get hour of java.util.date?
<p>When starting from a<code>java.util.date</code> object: what is the best way getting the hour part as an <code>integer</code> regarding performance?</p>

<p>I have to iterate a few million dates, thus performance matters.</p>

<p>Normally I'd get the hour as follows, but maybe there are better ways?</p>

<pre><code>java.util.Date date;
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
int hours = calendar.get(Calendar.HOUR_OF_DAY);
</code></pre>