LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-13-2003, 03:12 PM   #1
Tesl
Member
 
Registered: Jun 2003
Location: Durham, UK
Distribution: Slackware 9, Mandrake 9.1
Posts: 163

Rep: Reputation: 30
Java Performance


i had a quick search and couldnt really find any information on LQ, and the bits i found online werent incredibly helpful.

Anyhow, recently iv started doing a lot of work in Java (im currently coding an IM in Java) but im sure its a lot slower than the code i used to write in C++. I was not expecting my Java apps to run faster than my C++ apps (due to the VM) but i had been reading that Java programs can execute as slow as a third of the speed of a C++ program.

To me that seems very slow, and i was wondering how many performance issues Java programmers here have come across before. It does not appear to be a major problem, and i do enjoy coding in Java, however i wouldnt look forward to rewriting the entire system in C/C++ just to dramatically improve its performance

Im considering buying "Java Performance Tuning" for this reason, and im hoping with that the performance difference will be hardly noticeable
 
Old 12-15-2003, 01:20 AM   #2
nephilim
Member
 
Registered: Aug 2003
Location: Belgium
Distribution: Debian (server), Kubuntu (desktop)
Posts: 248

Rep: Reputation: 30
Quote:
Java programs can execute as slow as a third of the speed of a C++ program
I think that's a bit exagerated. It's true that java is slower than C/C++, but my experience is that this only is a problem when creating java GUIs. All backend services (db querying and data processing) are just as quick as any other language. That is, if you write well-designed code.
 
Old 12-15-2003, 02:45 AM   #3
iTux
Member
 
Registered: Dec 2003
Posts: 33

Rep: Reputation: 15
I don't think an IM client is that time critical anyway. And if you let it running all the time eventually all the Java bytecode will be just-in-time compiled to native code by the VM JIT-compiler (assuming the VM has a JIT compiler).

But if you want to take 4 times longer to develop/debug your apps go with C...

iTux
 
Old 12-15-2003, 02:51 AM   #4
nephilim
Member
 
Registered: Aug 2003
Location: Belgium
Distribution: Debian (server), Kubuntu (desktop)
Posts: 248

Rep: Reputation: 30
Also, if you want your code to be maintainable, java (or an OO approach anyway) is definitely the way to go.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Java plugin installed correctly for Firefox but not able to view any java applet tvn Linux - Software 10 04-15-2010 02:13 AM
poor java socket read performance bobwall Linux - Networking 0 01-21-2005 09:55 PM
slow java performance alaios Debian 1 01-08-2005 05:16 PM
Oracle Performance Manager java.lang.UnsatisfiedLinkError stusayre Linux - Software 0 12-14-2004 05:52 PM
Is there a way to improve java performance? jeffreybluml Linux - Newbie 1 07-10-2004 04:08 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration