Javascript: which 'time processing' function is faster?
<p>I just created two versions of a function that can be used to process the date and time and return it to different HTML elements. These elements will be displayed a phone lockscreen. The function is called every second, to make sure it jumps to the next minute in time.</p>

<ul>
<li>v.1 works at once: it processes every time unit (sec., min. day, month etc.) each second.</li>
<li>v.2 works step by step: if the numbers of second is at any time "0" process the minutes. Then, if minutes is "0" process the hours etc.</li>
</ul>

<p>I'd expected v.2 to be faster, but according to a test I did here: <a href="http://jsperf.com/timecalccompare" rel="nofollow">http://jsperf.com/timecalccompare</a> it's about 90% slower! <em>Is</em> it really slower or is the test unreliable?</p>
