last one isn't wrong. Depends on the platform. in IE it's totally true ... although probably not in the upcoming ie10. If the article was dated say March 3, 2008, it would be universally true.
In chrome the first method on my machine is 28ms, the second throws an error and doesn't run (I don't know whether this is ECMA spec or the Googs fault here).
In modern FF, the + scenario is 296 v. 423 ... + being faster, but not by much. My MBP doesn't have ie right now ... but yes, we've already established that I'm not claiming that array.push is faster now, in 2012 ... let me see what else I can dig up.
So, are we in agreement that + is faster than join()? You initially objected to my statement of such (with "in IE it's totally true" and then hinting that I may be correct in the future with IE10), but now you seem to be conceding the point.
(And in light of the article being "tricks" for modern web dev, I don't see much need to argue about what may have been the case in the past -- though I'm fully confident that any IE6/7 tests will show the same thing that I've been saying this whole time; perhaps you may find browser X at version Y will be faster with join(), but as far as blanket statements go, I think we can disqualify the OP's as false.)
2
u/kristopolous Sep 06 '12 edited Sep 06 '12
last one isn't wrong. Depends on the platform. in IE it's totally true ... although probably not in the upcoming ie10. If the article was dated say March 3, 2008, it would be universally true.