 |
 |
Java optimization
|
 |
|
 |
|
Junior Member
Join Date: Aug 2000
Status:
Offline
|
|
I am a non-programming college student with a CS major for a roomate. My roomate got an assignment to write a relatively simple (I'm gussing FPU intensive) java program, and he has to run it on windows, osx and unix.
I have a dual 1.8 G5, and his 2.4Ghz dell is beating the pants off it. Is it possible/easy to optimize java code for dual G5 processors?
Thanks,
CBS
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Aug 1999
Status:
Offline
|
|
Is the application threaded? That will help with the dual stuff.
I don't think the Java 1.4 implementation in OS X is very optimized for the G5 at this point.
|
|
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Feb 2003
Status:
Offline
|
|
The Aqua theme implementation of Java is slower then others, because Aqua has so more effects like shadows and transparency that other JVM do not have to worry about.
Try switching themes it can make a difference however, Java 1.4.1 is a very new JVM and is still undergoing optimization as it was rewritten in Cocoa with 10.2.
Also download 1.4.2 beta from Apple may also help.
Also compile the Application use Apple javac as it optimizes code specifically for Apples JVM. with the -o optimization flag.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Aug 2000
Status:
Offline
|
|
There's no gui, it's just a couple dozen lines of source code doing some calculations being run in terminal using the javac command.
Is the 1.4.2 beta stable?
Thanks
Originally posted by depolitic:
The Aqua theme implementation of Java is slower then others, because Aqua has so more effects like shadows and transparency that other JVM do not have to worry about.
Try switching themes it can make a difference however, Java 1.4.1 is a very new JVM and is still undergoing optimization as it was rewritten in Cocoa with 10.2.
Also download 1.4.2 beta from Apple may also help.
Also compile the Application use Apple javac as it optimizes code specifically for Apples JVM. with the -o optimization flag.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by sibellc:
There's no gui, it's just a couple dozen lines of source code doing some calculations being run in terminal using the javac command.
Is the 1.4.2 beta stable?
Thanks
If it's just a couple dozen lines, why not post them here and let us take a look?
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
Multiple processors will never help a single-threaded program unless the computer is doing a lot of other (unrelated) things. If you want to see the dual CPUs show a difference, then execute your test in two different threads simultaneously.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: May 2001
Location: Edinburgh, UK
Status:
Offline
|
|
I have always found the Mac implementation of Java to be extremely slow compared to any others that I have tried.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jul 2002
Location: San Jose, CA, USA
Status:
Offline
|
|
Originally posted by iJed:
I have always found the Mac implementation of Java to be extremely slow compared to any others that I have tried.
Really? I find quite the opposite to be true.
Not taking into account UI, I've built some large application server software in Java, developing and testing on MacOS X and deploying on Linux (Sun and IBM VMs) and Windows. For comparable hardware between the three platforms, the MacOS X Java VM is at least as fast as the VMs on Windows and Linux, if not faster at times.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2000
Location: Midwest
Status:
Offline
|
|
To answer the question about 1.4.2 stability, I have had no problems. There is a problem with the documentation not being installed, but 1.3.1 docs cover all but a few classes.
HTH
Craig
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|