X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=PerformanceTests%2FSunSpider%2Ftests%2Fsunspider-1.0%2Fbitops-3bit-bits-in-byte.js;h=ab3d7dec5390689a830610a5f51172d3877a5107;hp=1d85406809bdd92b8ce88260404ca908be3cf71d;hb=4942b86653de8f15bdd59ed600138a0ec58bb93e;hpb=d7bb6a6d33ab0dcb9388763c883088c4eea824de diff --git a/PerformanceTests/SunSpider/tests/sunspider-1.0/bitops-3bit-bits-in-byte.js b/PerformanceTests/SunSpider/tests/sunspider-1.0/bitops-3bit-bits-in-byte.js index 1d85406809bd..ab3d7dec5390 100644 --- a/PerformanceTests/SunSpider/tests/sunspider-1.0/bitops-3bit-bits-in-byte.js +++ b/PerformanceTests/SunSpider/tests/sunspider-1.0/bitops-3bit-bits-in-byte.js @@ -1,5 +1,7 @@ // Copyright (c) 2004 by Arthur Langereis (arthur_ext at domain xfinitegames, tld com +var result = 0; + // 1 op = 6 ANDs, 3 SHRs, 3 SHLs, 4 assigns, 2 ADDs // O(1) function fast3bitlookup(b) { @@ -25,8 +27,10 @@ addr3,r3,r10 function TimeFunc(func) { var x, y, t; +var sum = 0; for(var x=0; x<500; x++) -for(var y=0; y<256; y++) func(y); +for(var y=0; y<256; y++) sum += func(y); +return sum; } -TimeFunc(fast3bitlookup); +sum = TimeFunc(fast3bitlookup);