java compiler?
Hi All,
i am trying to compile a java app (hoping it will run faster), but i am running into a problem. I am trying to compile with gcj (gcc v3.4.4), but my app was built with java v1.6. a couple questions: 1. is there an easier compiler to use/install for redhat (work computer) 2. how can i install a second version of gcc/gcj (newest release), without overwriting the original (i can't, anyway) 3. can/should i use the -target 1.x option for my app build, and if so, does anyone know what version i should use to work with my version of gcj/gcc? any help appreciated -Trevor |
Quote:
|
does it include an ahead-of-time compiler?
|
It doesn't and I doubt it is in the Java community agenda to work in that direction.
Focusing on understanding why your program doesn't perform as well as you expect and improving it where it needs to be might be more productive than trying to run it under gcj. There is no strong evidence that a gcj compiled applications will run significantly faster (if faster at all) than the same one under recent JVMs. |
well, this application analyzes on the order of millions of lines of data each time it updates it's information. i need any speedup i can get (the interface is not the slow part, it is the updating of state information that the app tracks).
also, before i got my hands on this project, it was running of of swap space (holding on to maybe 20k records, each having ~10 strings in them), and i had to get around that by putting a limit on the amount of data that i could track. |
According to your description, there would be no significant advantage in ahead of time compiling. The JIT compiling time being peanuts compared to execution time.
Garbage collecting algorithms and heap sizing might make a difference. You may consider using a 64 bit JVM too. |
i didn't realize that the 'java' app was a jit compiler. i thought it was an interpreter.
could you tell me how to increase the heap size? is this a compile-time option or a runtime option? |
These are runtime options.
Try "java -Xint ..." and feel what pure interpretation performance looks like ... To set the heap size: -Xms<size> set initial Java heap size -Xmx<size> set maximum Java heap size eg. "java -Xms1g -Xmx1g ..." |
You also might want to look at Sun's Tuning Whitepaper for it's JVM.
|
thanks for the tips. i guess the book i read is a bit out of date (circa '99, i think), and it implied that the basic running of a java app was using interpreted, not a jit.
for reference (and to get an idea on what i might increase my heap size to be), is there any way to find out what the default heap size is? -Thanks |
The default maximum heap size is 64M.
|
Quote:
|
All times are GMT -5. The time now is 02:15 AM. |