There has been extensive testing on this (search the archives) and it's
been proven to my satisfaction that pre-decrementated loops are
consistently faster than post-decremented loops, and specifically that
while (--i -(-1)) is faster than while (i--), less p-code or not.

To the point that it's more readable, that's like saying that you prefer
quarter notes instead of sixteenth notes when reading music.  Once you
write while (--i -(-1)) a bunch, you have no trouble reading it.  It's a
hell of a lot easier to read than the fastest for loop syntax.

for (var i = myArray.length; --i -(-1); ) {}

I mean, if you find inline conditionals or non-braced if statements hard
to read, does that mean you shouldn't write them or that you should
learn to write them so you can learn to read them.

I didn't like mustard when I was younger.  Does that mean I shouldn't
ever like mustard?   ;)

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to