News for hackers. Stuff that matters.
Re:Why I absolutely love java by ichramm on Tuesday February 08, 2011 @07:27PM (#2195593)
That's the problem of java developers, they dont use the bitwise operations:

if(e.intValue()%2 != 0) == >>> if((e.intValue()& 1) != 0)

Re:Why I absolutely love java by jankassens on Tuesday February 08, 2011 @07:41PM (#2195636)
There's no problem here. You can be pretty sure simple calculations like this (and multiplications with a power of 2 vs. shifting etc.) will run the same machine code in the end.
Re:Why I absolutely love java by sfraser on Tuesday February 08, 2011 @10:57PM (#2196222)
I think you are right in this case - I updated my example code above to use bitwise and it is running in the same amount of time. (100,000 iterations in about 6 milliseconds)