| Author |
Message |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Mon May 22, 2006 12:12 am Post maybe stupid Post subject: |
 |
|
|
|
| Dr Brain wrote: | | 1. Java can do some things faster than C++ because it's interpreted (if you find this hard to believe, think for a moment). |
Done thinking. Give me a clue. _________________ 4,691 irradiated haggis! |
|
| Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Mon May 22, 2006 11:48 am Post maybe stupid Post subject: |
 |
|
|
|
If there is only one non-abstract class in existance of a certain superclass, Java doesn't have to do virtual function table lookups, it just compiles the function pointer straight into the code (or inlines it). Of course this compiled code is discarded by the JVM if another non-abstract class comes into play. But with C++, a virtual function always involves a virtual function table lookup.
EDIT: was missing a word _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
| Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Mon May 22, 2006 5:15 pm Post maybe stupid Post subject: |
 |
|
|
|
| Ok, but that's hardly a reason to use Java "for speed". It's still slower overall in every way from a functional point of view. |
|
| Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Mon May 22, 2006 6:03 pm Post maybe stupid Post subject: |
 |
|
|
|
No, but JVMs are getting smarter every day.
The difference between a console Java program and a C++ one is not notacable except in certain rare circumstances (doing extremely varied computations (just a simple computation over and over would get compiled to native by the JVM and run the same as C++)).
The differences between C++ and Java GUIs *is* humanly noticable, but this is where I point out that Java GUIs can be developed in a fraction of the time. Unless you're coding professionally (and sometimes even then), the slower GUI is quite worth the quick development time. |
|
| Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Mon May 22, 2006 7:10 pm Post maybe stupid Post subject: |
 |
|
|
|
| Brain wrote: | | The differences between C++ and Java GUIs *is* humanly noticable, but this is where I point out that Java GUIs can be developed in a fraction of the time. Unless you're coding professionally (and sometimes even then), the slower GUI is quite worth the quick development time. |
Which is why I really don't understand the current trend towards Java servers. _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him. |
|
| Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Mon May 22, 2006 7:26 pm Post maybe stupid Post subject: |
 |
|
|
|
| The server side JVM is extremely good at what it does. Server programs run for a long time, so the JVM actually takes the time to compile and heavily optimize the native code it generates. This means that for all intents and purposes the server side programs run every bit as fast as C++ programs, but with all the niceities of the Java language. |
|
| Back to top |
|
 |
SamHughes Server Help Squatter

Joined: Jun 30 2004 Posts: 252 Location: Greenwich Offline
|
Posted: Mon May 22, 2006 8:39 pm Post maybe stupid Post subject: |
 |
|
|
|
| Cyan~Fire wrote: | | Which is why I really don't understand the current trend towards Java servers. |
Where do you think the bottleneck on the server side is? It's not the programming language, it's the network and storage. There's no point in skimming a few microseconds off the time it takes to call some 10 ms database query, if it requires any amount of extra human labor. |
|
| Back to top |
|
 |
SpecShip Complete twat

Gender: Joined: Dec 17 2005 Posts: 514 Location: 8025 - Spec Freq Offline
|
Posted: Tue May 23, 2006 4:36 am Post maybe stupid Post subject: |
 |
|
|
|
You can lead a horse to water, you may even force it to drink but all the kick ass games and their servers are still being made in C++ and runescape is gay java crap that UO laughs about at nights. _________________ Replacing yazour untill the whore returns.
"I could run a ss server on my car stereo!" -Xalimar
"Liberta tuit ma ex infernis" -Event Horizon
"I know too much about nothing." - Mine GO BOOM
"Hmm anyway, back to my kingdom hearts." - Chambahs |
|
| Back to top |
|
 |
|