I have found that most problems are caused by program design drifting away from object oriented concepts. My advice would be to sharpen up on OO and UML skills.
Another place for quick gains is re-using objects. One of the slowest things to do is instantiate a new object. Many times you can just get rid of the contents and replace with other stuff (e.g. a display frame).
The second slowest thing to do is garbage collection. If you create and throw away fewer objects then there is less to be cleaned up.
There are different JVMs available that compile up faster code. Although most speed problems are due to high memory usage and not byte code speed.
Performance 'tricks' are normally for fairly advanced programmers. My first point will normally help all levels of programmer. My home ---->
there are some tricks for optimising by reading a bit of how bytecode is done.
If you use less than 5 variables (standard types, or reference (not sure for this one)) in a loop, they will be use through some special bytecode functions that can make your routine faster.
I have a couple of links on my Java Resources page but have not as yet written any further information. However, I am considering expanding the area to include such info.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.