On 05/07/2015 03:58 PM, Luc Maisonobe wrote:
> Le 07/05/2015 15:42, Thomas Neidhart a écrit :
>> I did not want to invalidate your effort,
> 
> 
> Don't worry about that. I learned a lot doing this, including
> something that really surprised me: pow(NaN, 0.0) *must* be 1.0
> and not NaN. AFAIK this is the only case where a NaN input does not
> propagate to output.
> 
> 
>> but check if a faulty branch
>> prediction / optimization might be the cause of the problem, which seems to
>> be confirmed now.
> 
> Yes, it seems to be the problem.
> 
>>
>> If you have an improved version of the pow function, please go ahead with
>> your modifications.
> 
> It doesn't improve anything, I run the performance benchmark and the
> results are exactly the same as our previous implementation, neither
> faster nor slower.
> 
> Could you merge your change back to master?

ok, merged.

I first read some something related to JIT branch optimization in this
article:
http://www.javacodegeeks.com/2013/06/jvm-performance-magic-tricks.html

The example there is quite scary imho but I am not sure if this is
really happening or allowed for the JIT compiler to do.

Maybe in our case it is simply a bug that occurs also only on very
specific hardware.

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to