Hello. Le sam. 8 mai 2021 à 08:42, Benjamin Marwell <bmarw...@apache.org> a écrit : > > Instead of using byte buddy, why not just maven multi release jars? *1
Thanks for the suggestion. Again, I don't know how to do it concretely[1] nor the implications (IIRC, the mention of multi-release JARs was frowned upon some time ago). > The Java9+ impl will go to META-INF/java9 or so. We did that in the > maven-jlink-plugin for example. *2 > Will be much faster and work on Java 16+. Much easier to rest. All good points, I guess. However, what about the potential of having a user-selectable version of the implementations of the functions contained in the JDK's "Math" class? Unless one can provide a reference that, from Java 9 on, the accuracy cannot be improved upon what the JDK computes, the point remains that "FastMath" is more accurate, so that we cannot assume that a transparent call to "java.util.Math" won't have side-effects. > Drawback: bad IDE support Personally I don't care. ;-) Regards, Gilles [1] If you'd like to propose a patch/PR, I could set up a dedicated branch. > > 1: https://maven.apache.org/plugins/maven-compiler-plugin/multirelease.html > > 2: > https://github.com/apache/maven-jlink-plugin/commit/f8bdf5050c266854524aaa51eb36109c00ca692a > > HTH > Ben > > > On Fri, 7 May 2021, 10:52 Erik Svensson, <erik.svens...@nasdaq.com> wrote: > > > Howdy all! > > > > > > > > I’m looking to do some work on FastMath to increase performance by using > > java.lang.Math where it is applicable (ie where there is an > > @HotspotIntrinsicCandidate annotation on the method). > > > > 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) I’m thinking about using ByteBuddy to > > construct a proxy class but I’m unsure whether that is allowed in Apache > > Commons. > > > > Btw, I’ve tested using MethodHandles but that consumed almost all the > > performance improvement java.lang.Math had over FastMath (for sin anyway). > > > > > > > > Cheers > > > > > > > > *Erik Svensson* > > > > Principal Architect > > Strategic Programs, Platform & Product Engineering > > > > [image: Nasdaq, Inc.] <http://www.nasdaq.com/> > > > > *Desk* > > *Mobile* > > *Email* > > *Address * > > > > + 46 8 405 66 39 > > + 46 73 449 66 39 > > erik.svens...@nasdaq.com > > Tullvaktsvägen 15, Stockholm > > > > [image: signature_170089658] <https://www.facebook.com/nasdaq/> > > > > [image: signature_1919909931] <https://twitter.com/nasdaq> > > > > [image: signature_1754902186] <https://www.linkedin.com/company/nasdaq> > > > > [image: signature_1778387217] <https://www.instagram.com/nasdaq/> > > > > [image: signature_1326178797] <https://www.pinterest.com/nasdaq/> > > > > rewritetomorrow.com > > > > > > > > ******************************************* > > CONFIDENTIALITY AND PRIVACY NOTICE: This e-mail and any attachments are > > for the exclusive and confidential use of the intended recipient and may > > constitute non-public information. Personal data in this email is governed > > by our Privacy Policy at https://www.nasdaq.com/privacy-statement > > unless explicitly excluded from it; please see the section in the policy > > entitled “Situations Where This Privacy Policy Does Not Apply” for > > circumstances where different privacy terms govern emailed personal data. > > If you received this e-mail in error, disclosing, copying, distributing or > > taking any action in reliance of this e-mail is strictly prohibited and may > > be unlawful. Instead, please notify us immediately by return e-mail and > > promptly delete this message and its attachments from your computer system. > > We do not waive any work product or other applicable legal privilege(s) by > > the transmission of this message. > > ******************************************* > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org