So for C2 it doesn't matter.  From what I can tell using javap, the xor 
generates the fewest number of bytecode operations.  Not that this breaks the 
bank but, one would think that fewer bytecodes would help C1.

Jason
________________________________________
From: core-libs-dev <[email protected]> on behalf of 
Aleksey Shipilev <[email protected]>
Sent: Monday, December 21, 2015 4:02 AM
To: Andrew Haley; [email protected]
Subject: Re: RFR: 8145680: Remove unnecessary explicit initialization of        
volatile variables in java.base

On 12/21/2015 12:46 PM, Andrew Haley wrote:
>> See: "Speed-kings of inverting booleans" at
>> http://www.javaspecialists.eu/archive/Issue042.html
>
> That's from 2002, and not valid any more.  Maybe not valid even back
> then.

It is not valid today, I've checked a while ago:
 http://cr.openjdk.java.net/~shade/scratch/BooleanNegate.java

-Aleksey

Reply via email to