This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Performace guidlines (tipps)?


Clemens Eisserer wrote:

I want to write some gnu-apps which should be primary optimizied for gcj.
Are there some performance tipps whats better and faster? Are there
somewhere written guidlines avaible?
For the most part the same performance guidelines you apply to regular Java code should be applied to GCJ. In particular you should try to avoid unneccessary synchronization and avoid creating too many short-lived objects, instead re-using existing ones wherever possible.
I'm currently using gcj-3.0.4. Will an upgrade enhace performance over 20%?
You should find that 3.1 and up have improved performance over 3.0.x, it probibly depends on your app exactly how substantial the difference is.

one example:

is  this better:

class c;

while(n>m)
{
    c=new class();
}

or is it better to create the "class c;" in the loop.

It should make no difference.

regards

Bryce.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]