Jump to content

  • Log In with Google      Sign In   
  • Create Account

[java] java.lang.Math functions


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 appleweed   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 November 2000 - 12:31 PM

Hey all... I was fiddling around with optimizing some code and I used a typical approximation to replace the SQRT() function. (This is common when coding vector length calculcations in C.) Funny thing, I tried several well-known approximations and found that my code, at best, ran as fast as the Math.sqrt() call or _slower_! I''m using JDK 1.3... anyone know if Sun has made the math library functions as optimized as possible? -Omar --- "We are Indigenous. Welcome." Indigenous Technologies, Inc.

Sponsor:

#2 snowmoon   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 November 2000 - 01:48 PM

Yes, the Math library is ( I believe ) all calls to native routines that are optimized. For many of them the call overhead is much larger than the acutal math.

#3 appleweed   Members   -  Reputation: 122

Like
Likes
Like

Posted 28 November 2000 - 08:04 AM

Thanks, Snowmoon!

---

"We are Indigenous. Welcome."
Indigenous Technologies, Inc.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS