|
function doStandard()
{
/* common code */
for (l=1;l<iterations+1;l++)
{
testVal++;
}
/* common code */
}
|
function doFast()
{
/* common code */
l = iterations;
do
{
testVal++;
} while (--l);
/* common code */
}
|
function doFastest()
{
/* common code */
n = iterations % 8;
while (n--)
{
testVal++;
}
n = parseInt(iterations/8);
while (n--)
{
testVal++;
testVal++;
testVal++;
testVal++;
testVal++;
testVal++;
testVal++;
testVal++;
}
/* common code */
}
|