Любопытные результаты в разных браузерах )
<script>
var ret=0 , t1, t2 , x=false;
t1 = new Date();
ret = 0;
for (i=0; i < 10000000 ; i++){ret += (x << 1) - 1 } ;
t2 = new Date();
document.write(t1-t2); document.write("<br>");
document.write(ret); document.write("<br>");
//------------------------
t1 = new Date();
ret = 0;
for (i=0; i < 10000000 ; i++){ret += x ? 1 : -1 } ;
t2 = new Date();
document.write(t1-t2); document.write("<br>");
document.write(ret); document.write("<br>");
//------------------------
t1 = new Date();
ret = 0;
for (i=0; i < 10000000 ; i++){ret += x - !x ;} ;
t2 = new Date();
document.write(t1-t2); document.write("<br>");
document.write(ret); document.write("<br>");
//------------------------
t1 = new Date();
ret = 0;
for (i=0; i < 10000000 ; i++){ret += (x - .5) * 2 ;} ;
t2 = new Date();
document.write(t1-t2); document.write("<br>");
document.write(ret); document.write("<br>");
//------------------------
t1 = new Date();
ret = 0;
for (i=0; i < 10000000 ; i++){ret += +x || -1 ;} ;
t2 = new Date();
document.write(t1-t2); document.write("<br>");
document.write(ret); document.write("<br>");
//------------------------
</script>