RFR: 8145680: Remove unnecessary explicit initialization of volatile variables in java.base

Jason Mehrens jason_mehrens at hotmail.com
Mon Dec 21 15:48:58 UTC 2015


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 <core-libs-dev-bounces at openjdk.java.net> on behalf of Aleksey Shipilev <aleksey.shipilev at oracle.com>
Sent: Monday, December 21, 2015 4:02 AM
To: Andrew Haley; core-libs-dev at openjdk.java.net
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




More information about the core-libs-dev mailing list