Hello all!

I work for a fintech company and we do a lot of risk computations using, among 
other things, FastMath.
Recently I had the opportunity to do some performance testing using JMH and 
found, to my surprise, that once
you move beyond Java 8, java.lang.Math outperforms FastMath, sometimes quite 
considerably. Graal11 especially is very performant.

I’ve traced the cause to the introduction of @HotSpotIntrinsicCandidate in java 
9 that replaces the Java 8 JNI call.

I could just use the Math package where we explicitly call the FastMath package 
but we use other commons.math stuff that depends on FastMath which means that 
they miss out on the possible performance gains.

I’m wondering if there is any effort to handle this in FastMath as the gains 
are quite considerable. 

One solution would be to check for the annotation in the Math package, and if 
it’s available, use the Math package instead.


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

Reply via email to