
What's the Fastest Way to Code a Loop in JavaScript? - d0mine
http://blogs.sun.com/greimer/entry/best_way_to_code_a
======
ajross
Beware: this is a microbenchmark. It tells you a little about the interpreter
innards that get used for different kinds of syntax, but that's about it.

Unless you're writing tight loops over small data, though (e.g. doing
cryptography in Javascript or whatnot) this is _not_ where you will be seeing
slowdowns. In the real world, performance analysis always needs to start with
the data. Are the questions you are asking your data algorithmically fast? Are
you failing to cache things that are expensive to compute and hurting
performance? Are you _incorrectly_ caching things that are easy to compute and
hurting performance?

Those are the real problems. And they have nothing to do with for() vs.
Array.forEach().

------
notauser
(Almost on topic)

There is a JavaScript meetup in London on the 13th of August.

<http://javascript.meetup.com/3/>

------
d0mine
The benchmark is faulty but nonetheless informative.

------
geuis
this is potentially very useful info. In what ways is the benchmark wrong?

