Summary

Creating alternate math methods can pay off in certain cases, particularly with lookup tables for functions such as sine and cosine, but may not pay off well for iterative approximation methods for the typical square root implementations. Success in reducing math costs very much depends on higher-level algorithm choice, math function implementation, and the JVM version and settings. In addition, math-focused classes such as vectors and matrices can benefit greatly from careful performance-oriented design.

Java math has come a long way from its interpreted roots, and this sample set shows that trying to improve upon the latest JVM optimizations is getting increasingly difficult, yielding ever-shrinking performance gains over the standard math APIs and only worth the effort in the most specialized of cases—all of which is great news to Java game developers.



Practical Java Game Programming
Practical Java Game Programming (Charles River Media Game Development)
ISBN: 1584503262
EAN: 2147483647
Year: 2003
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net