StrictMath versus Math

I came by this article:

http://www.osnews.com/story.php?news_id=5602&page=3



Here is the reason posted:





http://forum.java.sun.com/thread.jspa?threadID=481284&start=0&tstart=0





As far as I am have understood 1.4.1 trig is slow cause it uses " software" math instead of hardware.



You prolly already have taken this into account by fastmath?

Well, yes and no. Currently, in FastMath, we build up trig tables and just query the arrays. But this has to be activated in order to work:



FastMath.USE_FAST_TRIG = true;



Some people have reported a 200+ fps increase when using fast trig, but because the tables can’t take for every single angle, their accuracy is less than what Math can give. So the default is math, but is switchable.



Hope that helps,

DP

Those links are a big part of what I was reading around the time FastMath’s lookup tables were added. :slight_smile: