![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jan 2007
Posts: 6
Rep Power: 0
![]() |
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??
|
|
|
|
|
|
#2 |
|
Hobbyist Programmer
|
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 |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Dec 2006
Posts: 53
Rep Power: 0
![]() |
Yeah, C is one of the more fast and efficient languages, especially against Java.
|
|
|
|
|
|
#4 |
|
Caffeinated Neural Net
![]() Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,126
Rep Power: 5
![]() |
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 |
|
|
|
|
|
#5 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 6
![]() |
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. |
|
|
|
|
|
#6 |
|
Newbie
Join Date: Jan 2007
Posts: 6
Rep Power: 0
![]() |
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |