Test this code in Flash:
var i:int = 0; for (var j:int = 0; j < 5000000; j++) { i=i+1; }// use about 300ms. i = 0; for (var j:int = 0; j < 5000000
I don't have a response to your question but the following has been the fastest among all the loops I tried.
import flash.utils.getTimer; var t:int = getTimer(); var i:int = 0, j:int = -1; while (++j < 5000000) { i += 1; } trace(getTimer()-t)
This gives me 83 ms.