| | |
how do you make java programs faster?
![]() |
ibm.com has an article about how to make java programs faster ... I dont remember the page address ... but you can search ibm for java.
•
•
Join Date: Jun 2004
Posts: 609
Reputation:
Solved Threads: 7
hello everyone,
I once did this with the awt class in which i developed a small program in C++ and an exact clone of it in Java (functionality wise). I also developed another program in C++ to act as a benchmark thus testing seeing how fast each program responds to anything.
All the java functions were done in different threads including its click events
It seems that the Java is faster than C++ ranging from 330ms-390ms for all functionalities.
This was done years ago.........
I don't even know where the C++ benchmark program or it source codes are anymore
I am not sure about swing as i only tested for awt
Yours Sincerely
Richard West
I once did this with the awt class in which i developed a small program in C++ and an exact clone of it in Java (functionality wise). I also developed another program in C++ to act as a benchmark thus testing seeing how fast each program responds to anything.
All the java functions were done in different threads including its click events
It seems that the Java is faster than C++ ranging from 330ms-390ms for all functionalities.
This was done years ago.........
I don't even know where the C++ benchmark program or it source codes are anymore
I am not sure about swing as i only tested for awt
Yours Sincerely
Richard West
Really the best way to speed up your program's compile time is simply getting a faster compute machine. I don't really see the point in inproving the compile time as you are not taking hours to compile are you?
For the run time improvements, you should have a good grasp on how java works. This mostly comes through common sense, a solid computer science background, and experience.
There are many tools you could use: profilers, memory leak checkers, etc. If you are developing for the enterprise, Wily is a good tool I've used before: http://www.wilytech.com/
Ah and also, a good site I like to look at for reference on Java performance tuning is of course: http://www.javaperformancetuning.com/
Ed
For the run time improvements, you should have a good grasp on how java works. This mostly comes through common sense, a solid computer science background, and experience.
There are many tools you could use: profilers, memory leak checkers, etc. If you are developing for the enterprise, Wily is a good tool I've used before: http://www.wilytech.com/
Ah and also, a good site I like to look at for reference on Java performance tuning is of course: http://www.javaperformancetuning.com/
Ed
•
•
•
•
In a world without walls or fences,
What use are Windows and Gates.
freesoft: It seems highly likely that your test was flawed. spawning new threads for every gui action is generally a bad idea.
There are many factors that could have caused the performance you saw. You say you wrote the same functionality in the two programs---that doesn't say much. A sloppily written Java program is just as bad as a sloppily written C++ program. It doesn't sound like you created the same program in C++ and java.
That said, I believe that for most programs written with care in C++ and Java, you should expect roughly the same performance.
Ed
There are many factors that could have caused the performance you saw. You say you wrote the same functionality in the two programs---that doesn't say much. A sloppily written Java program is just as bad as a sloppily written C++ program. It doesn't sound like you created the same program in C++ and java.
That said, I believe that for most programs written with care in C++ and Java, you should expect roughly the same performance.
Ed
•
•
•
•
Originally Posted by freesoft_2000
hello everyone,
I once did this with the awt class in which i developed a small program in C++ and an exact clone of it in Java (functionality wise). I also developed another program in C++ to act as a benchmark thus testing seeing how fast each program responds to anything.
All the java functions were done in different threads including its click events
It seems that the Java is faster than C++ ranging from 330ms-390ms for all functionalities.
This was done years ago.........
I don't even know where the C++ benchmark program or it source codes are anymore
I am not sure about swing as i only tested for awt
Yours Sincerely
Richard West
•
•
•
•
In a world without walls or fences,
What use are Windows and Gates.
![]() |
Similar Threads
- How to make Windows XP 200 % faster??? (Windows NT / 2000 / XP)
- Can I make a Java Image Editing Photshop-like program (Java)
- How to make Java and C++ sockets play nice (Java)
Other Threads in the Java Forum
- Previous Thread: Help Needed ! ! !
- Next Thread: java uses or overrides a deprecated API??
| Thread Tools | Search this Thread |
911 actionlistener addressbook android api append applet application array arrays automation binary blackberry block bluetooth character chat class client code component consumer csv database desktop developmenthelp eclipse error fractal ftp game givemetehcodez graphics gui html ide image integer j2me j2seprojects japplet java javaarraylist javac javaee javaprojects jni jpanel julia lego linked linux list loops mac map method methods mobile netbeans newbie number objects online oriented panel printf problem program programming project projects properties recursion replaydirector reporting researchinmotion rotatetext rsa scanner se server set singleton sms sort sql string swing test textfields threads time title tree tutorial-sample ubuntu update windows working






