Math trig intrinsics and compiler options
gustav trede
gustav.trede at gmail.com
Thu Jul 16 08:39:14 PDT 2009
2009/7/16 Christian Thalinger <Christian.Thalinger at sun.com>
> Azeem Jiva wrote:
> > Joe,
> > Gustav sent me an email asking for help with the intrinsification of
> > the trig functions and a suggestion I gave him was to not call
> > fsin/fcos/ftan since those instructions are microcoded on Intel/AMD
> > hardware and very slow. Slower than the call to
> > sharedRuntimeTrig.cpp, and in all cases it's best to stay away from
> > the hardware instructions.
>
> I just did some micro-benchmarking on an Intel Core2 Duo and in the
> range of [0,2pi) inlining the hardware instructions is slightly faster
> (about 2.5%). Limiting the range to [0,pi/4) (means no runtime calls)
> hardware instructions are 1.5x faster.
>
> I think we should keep the current approach.
>
> -- Christian
>
do you mind sharing details about that test so i can reproduce it ?.
--
regards
gustav trede
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20090716/2a30f54e/attachment.html
More information about the hotspot-dev
mailing list