Sure, rerunning with -XX:TieredStopAtLevel=1 there's evidently a very small overhead of return !falseValue over return trueValue:

DefaultInitBench.trueWithFalseValue avgt 15 5.482 ± 0.077 ns/op
DefaultInitBench.trueWithTrueValue avgt 15 5.147 ± 0.037 ns/op

I prefer to keep the patch as-is.

/Claes

On 2015-12-21 16:48, Jason Mehrens wrote:
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

Reply via email to