Ever any performance different between Java >> and >>> right shift operators?

Posted by Sean Owen on Stack Overflow See other posts from Stack Overflow or by Sean Owen
Published on 2010-03-26T20:37:10Z Indexed on 2010/03/26 21:13 UTC
Read the original article Hit count: 511

Is there ever reason to think the >> (signed) and >>> (unsigned) right bit-shift operators in Java would perform differently? I can't detect any difference on my machine.

This is purely an academic question; it's never going to be the bottleneck I'm sure. I know: it's best to write what you mean foremost; use >> for division by 2, for example.

I assume it comes down to which architectures have which operations implemented as an instruction.

© Stack Overflow or respective owner

Related posts about java

Related posts about bit-shift