Hello. Le ven. 7 mai 2021 à 10:52, Erik Svensson <erik.svens...@nasdaq.com> a écrit : > > Howdy all! > > > > I’m looking to do some work on FastMath
Thanks for your interest. > to increase performance by using java.lang.Math where it is applicable (ie > where there is an @HotspotIntrinsicCandidate annotation on the method). Please be sure have a look at the open issues that mention "FastMath" on the bug tracking system.[1] > > Since HIC was introduced in java 9 and the code needs to work on pre-java 9 > and I don’t want to compromise performance (since performance is the whole > reason I’m doing this) One important point is that "FastMath" was probably not a good name, as the most consistent feature is accuracy, better than JDK's "Math" at the time. If that's still the case we may not want to loose that. > I’m thinking about using ByteBuddy to construct a proxy class I don't know anything about it, but it seems a way to implement the feature that will let the caller decide what is more important (precision or performance). Correct? > but I’m unsure whether that is allowed in Apache Commons. It's under ASL 2.0. So the only question would be whether a dependency towards a library outside Commons is acceptable. Could this be implemented around an _optional_ dependency? > > Btw, I’ve tested using MethodHandles but that consumed almost all the > performance improvement java.lang.Math had over FastMath (for sin anyway). > Did you use JMH for the benchmark?[2] The first step is perhaps to open a new JIRA issue and post the result over there. We want to modularize Commons Math, so setting up a module for JMH testing is welcome. Regards, Gilles [1] https://issues.apache.org/jira/issues/?jql=project%20%3D%20MATH%20AND%20status%20%3D%20Open%20AND%20description%20%20~%20%22FastMath%22 [2] At the time, we implemented (2) custom benchmarks (see the test sources). > > Cheers > > > > Erik Svensson > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org