Roll leveldb 3f7758:803d69 (v1.17 -> v1.18)
[chromium-blink-merge.git] / chrome / test / data / dromaeo / tests / sunspider-bitops-bits-in-byte.html
blobf3cbf2127e8bc95329756eddd334fb7562660b58
1 <html>
2 <head>
3 <script src="../htmlrunner.js"></script>
4 <script>
5 // Copyright (c) 2004 by Arthur Langereis (arthur_ext at domain xfinitegames, tld com)
8 // 1 op = 2 assigns, 16 compare/branches, 8 ANDs, (0-8) ADDs, 8 SHLs
9 // O(n)
10 function bitsinbyte(b) {
11 var m = 1, c = 0;
12 while(m<0x100) {
13 if(b & m) c++;
14 m <<= 1;
16 return c;
19 function TimeFunc(func) {
20 var x, y, t;
21 for(var x=0; x<100; x++)
22 for(var y=0; y<256; y++) func(y);
25 window.onload = function(){ startTest("sunspider-bitops-bits-in-byte", '245fac8a');
27 test("Bit in byte (2)", function(){
28 TimeFunc(bitsinbyte);
29 });
31 endTest(); };
32 </script>
33 </head>
34 <body></body>
35 </html>