Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 13th, 2007, 10:05 PM   #1
GrepingGrok
Newbie
 
Join Date: Jan 2007
Posts: 6
Rep Power: 0 GrepingGrok is on a distinguished road
java c comparison

I'm not sure if this is the right place to post this but anyway. If u compare c and java which would use less memory, cpu, and take less space??
GrepingGrok is offline   Reply With Quote
Old Jan 13th, 2007, 10:58 PM   #2
mrynit
Hobbyist Programmer
 
mrynit's Avatar
 
Join Date: Mar 2006
Location: WA, USA
Posts: 342
Rep Power: 3 mrynit is on a distinguished road
Send a message via AIM to mrynit Send a message via MSN to mrynit Send a message via Yahoo to mrynit Send a message via Skype™ to mrynit
C

java code is copiled into bytecode. then the java vertiual machine interpets it.
__________________
i dont know much about programming but i try to help
mrynit is offline   Reply With Quote
Old Jan 13th, 2007, 11:39 PM   #3
BinarySurfer
Programmer
 
BinarySurfer's Avatar
 
Join Date: Dec 2006
Posts: 53
Rep Power: 0 BinarySurfer is an unknown quantity at this point
Yeah, C is one of the more fast and efficient languages, especially against Java.
BinarySurfer is offline   Reply With Quote
Old Jan 14th, 2007, 1:00 AM   #4
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,126
Rep Power: 5 lectricpharaoh will become famous soon enough
Regarding the size of the program itself, in many cases, the Java program will be smaller, especially if the C program is statically linked.

If you're asking about run-time memory consumption, the C program will probably be smaller by this standard, as it will not require that an associated virtual machine be loaded as well, in order to process the bytecode.

As to performance, the C program will be more efficient, given that all other factors are equal. However, this may or may not have any real-world impact on performance. For example, if the program is input-driven, as it will spend most if its time waiting for the user, and if the Java version supports threads while the C version does not (as will be the case without platform-specific code for the C version), it will be able to suspend threads rather than burn CPU cycles in tight loops while waiting for events, I/O completion, etc.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Old Jan 14th, 2007, 1:48 AM   #5
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 6 bl00dninja is on a distinguished road
the above point alludes to the fact that a faster development time (time * paying people to code = cost) may outweigh the performance advantage, particularly if it (cpu usage, etc.) is relatively small. you just have to look at the big picture in the commercial sense.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Jan 14th, 2007, 11:18 AM   #6
GrepingGrok
Newbie
 
Join Date: Jan 2007
Posts: 6
Rep Power: 0 GrepingGrok is on a distinguished road
Thanks thats just wat I wanted to know
@bl00dninja I understand that in the comertial sense a slight performence increas might not be beneficial but the Q was more out of curiosity
GrepingGrok is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming with Java: Tutorial ReggaetonKing Java 7 May 20th, 2008 11:58 AM
Special browser in Java (Project) stalefish Java 3 Feb 9th, 2008 5:22 PM
First Java Program duale2005 Java 3 May 22nd, 2006 6:17 PM
Java programmers, game developers, artists, be ware! RPG game team is recruiting! atcomputers.us Paid Job Offers 7 Sep 25th, 2005 8:25 PM
Begin my first lesson to learn Java satimis Java 7 Mar 3rd, 2005 3:45 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:29 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC