Skip to main content

java.Math or java.lang.StrictMath which?

2 replies [Last post]
byhisdeeds
Offline
Joined: 2006-01-06
Points: 0

I'm having to loop through about 10,000 points and calculate some angles using the atan2 function. Can anybody tell me which of the two packages java.lang.Math or java.lang.StrictMath I should use the atan2 function to get optimum thru put, or are there any standardc tricks that I can use to achive maximum speed.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tmarble
Offline
Joined: 2003-08-22
Points: 0

In case you haven't seen it, check out the thread
on Trig Performance:

http://forums.java.net/jive/thread.jspa?threadID=2151&tstart=15

HTH,

--Tom

alexlamsl
Offline
Joined: 2004-09-02
Points: 0

if you want speed over accuracy, java.lang.Math would be the one to take ;)