Math trig intrinsics and compiler options
gustav.trede at gmail.com
Fri Aug 7 03:19:00 PDT 2009
2009/8/7 Christian Thalinger <Christian.Thalinger at sun.com>
> gustav trede wrote:
> > When i tested with b67 the current hotspot does not manage to remove
> > that object allocation by using cpu registers, even on 64 bit jvm with
> > its many registers available.
> > Also breaking up some very large methods into several smaller is a
> > general nice thing to do regarding both performance and OO design.
> And how is the performance compared to the current implementation?
> -- Christian
That implementation has done some optimizations that causes loss of
sin Double.longBitsToDouble(0xc01921fb54442d18L) should give
Double.longBitsToDouble(0x3cb1a62633145c07L) but it fails with 285703
It also seems to never complete for for some input values, cos
1.7976931348623157E308 is one example.
There are working java implementations, one is:
That one at least passes my informal tests, matching current strictmath
results exactly for billions of values regarding cos, sin at least.
performance difference depends heavily on platform, i will remove the
double y usage and compare with the current solaris version, that seems to
be the fastest one.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-dev