944,073 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 9872
  • Java RSS
Sep 11th, 2004
1

how do you make java programs faster?

Expand Post »
This is just a general question. I was wondering how you can make programs compile and run quicker? Does it have to do with the primative type you use or what?
Similar Threads
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Sep 11th, 2004
0

Re: 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.
Team Colleague
Reputation Points: 45
Solved Threads: 56
Unauthenticated Liar
nanosani is offline Offline
1,767 posts
since Jul 2004
Sep 12th, 2004
0

Re: how do you make java programs faster?

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
Reputation Points: 25
Solved Threads: 10
Practically a Master Poster
freesoft_2000 is offline Offline
623 posts
since Jun 2004
Sep 13th, 2004
0

Re: how do you make java programs faster?

http://www-106.ibm.com/developerwork...y/j-javaopt/#1


I found the link for performance improvement.
Team Colleague
Reputation Points: 45
Solved Threads: 56
Unauthenticated Liar
nanosani is offline Offline
1,767 posts
since Jul 2004
Sep 14th, 2004
0

Re: how do you make java programs faster?

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
Reputation Points: 17
Solved Threads: 1
Junior Poster
cosi is offline Offline
153 posts
since Aug 2004
Sep 14th, 2004
0

Re: how do you make java programs faster?

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


Quote 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
Reputation Points: 17
Solved Threads: 1
Junior Poster
cosi is offline Offline
153 posts
since Aug 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Help Needed ! ! !
Next Thread in Java Forum Timeline: java uses or overrides a deprecated API??





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC