Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Thaynx

Java Speed tests

This topic is 6938 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Someone feel free to enlighten me but I''m trying to figure out what Java brings to the table. I see the thoughts Kylotan is mentioning and let me say it is all too easy to write bad C/C++ and far more difficult to write good C/C++. For instance passing by value: you incur the cost of copying all the data plus invoking the copy constructor of the class when using you could be using a const reference that would resolve to a simple 4 byte pointer from optimized read only memory. It''s a no brainer what''s faster. Are JITs smart enough to figure those things out? Let me answer to a couple of other arguements on Java that I hear and feel free to share your thoughts. I''m honestly looking for intelligent responses (as opposed to flames) so all you Java folks feel free to enlighten me:

OOP: I love OOP, I don''t need a language telling me I have to do it. I do it anyway.

Pointers and Memory: Personally I don''t think either is too hard. Plus it gives you a good deal of power. However, I will conceed that many people find this aspect of C/C++ difficult and/or manage it poorly.

Cross Platform: Again, personally, I don''t care. No, I''m not an MS/Win freak. I actually code UNIX by day and appreciate is sleak effiency but when it comes to games PCs offer the widest away of hardware and tools for games, IMHO. I currently only have time to focus on this platform so that''s where I put my game coding energy. Plus I''ve heard that Java is not as cross platform as people say (and not just from MS''s changes). It doesn''t make me feel warm and fuzzy either that Sun revoked its standards attempt.

I don''t want to get trapped in the thought that C/C++ is the only thing and that it''s better but to be honest I don''t see a lot a Java being used. In my day job, a large software development house, we actually are using LESS Java and conversions and such from things like VB are going to C++ instead. And there is no question what game developers are using. So tell me: What is so cool that should make me jump to Java? And if it is so cool why isn''t the IT world flocking to it instead of continuing with C/C++ for app development?

Sieggy

Share this post


Link to post
Share on other sites
Advertisement
Sieggy - When you said - In my day job, a large software development house, we actually are using LESS Java and conversions and such from things like VB are going to C++ instead. And there is no question what game developers are using. So tell me: What is so cool that should make me jump to Java? And if it is so cool why isn''t the IT world flocking to it instead of continuing with C/C++ for app development?

- I have to be honest, you made me stop and think (and that can be a dangerous thing, lol). Just remeber that just because we see our own company using LESS Java doesn''t mean that is what the world is doing. It is really easy to get into the mode of "I don''t see it therefore it isn''t happening." I am NOT saying that you or anyone else is narrowminded or anything like that. Up until just a few days ago when my curiosity got to me and I ran the code to see how the 2 languages compared, I thought that Java would never compete.

Here is one thought. You said that you love OOP. Me too! I love it, actually I have a hard time going back to the "top down approach". One thing we have to remember is that OOP came about in the early to mid 80''s! How many places did you see using it though? Almost none! When did universities start teaching it? Around 90 from what I can tell (might be wrong, I have been ONCE before). OOP really didn''t become the monster it is now until about the early to mid 90''s. Apply this to Java. Of course the world isn''t going to flock to anything new. It is very difficult to look forward and see the next trends in technology and be a leader. Most companies are followers. Just a fact of life.

BTW, you were asking about JIT''s and how smart they are. You would be amazed at how smart they are now and they are getting better all the time. Especially on server side of applications. From what I have been hearing in newsgroups, lots of companies are going Java because of the rapid developement it offers. I do have to admit, Java is a very fast language to build up complex applications.

As far as not really caring about being crossplatform, I can understand that. With C and C++ you sort of have to pick which one you want and then go for that platform. With Java I put in my efforts to a program not a platform. When you were asking about it not being so platform independent, (this is what I have come accross) it depends on the implementation of the JVM. If it is done poorly, it won''t work very well. For the most part you can trust the big guy''s JVS''s and JIT''s. Here is a for example, right now I am developing an application that runs on registers (like the ones in the checkout isle in the grocery stores) and at first it was kind of buggy. After checking it out, it wasn''t my stuff but the JVM that was running on the register. IBM had to redo part of the JVM and it works fine now.

A quick question, I haven''t heard this thing about Sun not trying to do the standards thing. What is that all about? From what I see on their site, it is the opposite. All the api interfaces that they are defining for third party vendors are forcing the vendors to be compliant. I am really interested in this point!

If you can''t win, make sure the one that beats you breaks the record!

Share this post


Link to post
Share on other sites
CobraA1, think before you post AND then think again.
K, I have seen some good arguments here, Now I add some more, well good or bad, you can decide.

Java is in version 1.3 right now, It means that it has been developed only few years. Visual C++ is in version 7 if I remember right, what is Java''s version? 1.3? So, it means that VC7 has C + Ansi C++ + it''s own 7 versions behind it when Java has only 1.3

Which one is free?
Java

Which one brings up more releases in a year?
Java, VC''s releases are made so that Microsoft gets the profit, see? It''s almost speed of year/release.

Java right now is only little behind natural C++, so the day when Java is faster than C++ won''t be too far away from here, what happens then? People will start believing in Java when some pre-techers have released some good looking games, which are played.

My opinion is that it is being arrogant if not to open mind for new languages, what happened to Fortran or Cobol? C++ won''t live forever!


Time comes, time goes and I only am.

Share this post


Link to post
Share on other sites
C++ won''t live forever!? Dem''s fight''n words! hehe

A word about the cross platform idea: True Windows dominates the market, no doubt about that. But by what percent? How much of the total? Mac OS is 1/3 that of windows, with many others out there almost as big. So let''s just say that 70% of the market is Windows, 30% is other OSes. Why loose that additional 30%? Is the money just not worth it? If you made $700,000 on your game, you might have made $1,000,000 if it worked on all platforms.

E:cb woof!

Share this post


Link to post
Share on other sites
Arch@on, if you're going to compare VC++ 6.0 (7.0 isn't out yet), compare it to VJ++ 6.0, not Java in general.

aig

Edited by - An Irritable Gent on May 10, 2000 1:10:22 PM

Share this post


Link to post
Share on other sites
Gent - what in the world are you talking about? Why can''t he compare a widely used complier to Java in general? What you are suggesting is that he compare a Great compiler (or what I think is a great compiler, not the best though) with a piece of junk! Why not compare it with another great compiler, like Symantec''s Visual Cafe? Or even the run of the mill javac.exe compiler? Compilers are not the issue here! It is the speed of the byte code vs. speed of the machine code.

Ok, lets do this, someone send me some of your C code and what you believe is a super optimized .exe and I''ll translate it to Java and we''ll see what the difference is! Please don''t make it a project that will take a year and a half to translate though! Or someone post what their findings are for the same type of test.

If you can''t win, make sure the one that beats you breaks the record!

Share this post


Link to post
Share on other sites
> Why can''t he compare a widely used complier to Java in general?

He can. But then I could compare a widely used free compiler with VJ++ and use his same arguments (price, version # difference, who gets profit, number of upgrades a year, etc)

Relax, I was just pointing out an unbalanced comparison.

aig

Share this post


Link to post
Share on other sites
Thaynx:
I'm pretty sure that what AIG means is that comparing Microsoft's C++ compiler to the Java language (as far as version numbers go) is sort of like comparing a Volkswagen Jetta to a diesel engine. It doesn't make any sense. The version number of an IDE has absolutely NOTHING to do with the state of the language.

Edited by - jaxson on May 10, 2000 1:34:57 PM

Share this post


Link to post
Share on other sites
10 years from now C++ will have been placed in the ''History Book of Dead Languages'' - right next to Cobol - and 90% of all new code development will be in Java. Fate providing I will be here on the Internet having this same argument with many of you about whatever language comes along to replace Java. And at that point, when I find myself defending the entrenched language against its fancy new upstart, I will know what it is like to be a C++ programmer right now. I will look back with nostalgia. Possible even a tear will come to my eye as I think about what my 18 year old daughter - who will then be going away to college in just a few months - was like when she was 8 and I was the iconoclastic zealot holding the Hotspot 2.0 compiler as a shield against the onslaught of C++ function pointers.

And if we are really lucky - in the year 2010 - Sun may only be a few more months away from fulfilling its promise and transferring Java to a standards body.

= )

Share this post


Link to post
Share on other sites
C++ will be around for a long time yet, Java won''t be killing it off any time soon. C++ has the benefit of being closer to the machine than Java (hmm, device drivers in Java? I hope not), and there are a hell of a lot more C programmers who would move to C++ than there are C++ programmers who would move to Java. Java lacks some useful features which means it is not a ''C++ killer''. There are benefits and drawbacks of Java, and while that is so, people are not going to want to move over. Whereas people move from C to C++ because C++ supports nearly everything C does, and more besides. If you think of C++ as an evolution of C rather than ''some new language'', then you''ll see it is not just another language with a 10 year lifespan, due to its immense versatility.

Most of Java development has been led by the hype, such as people predicting Java-powered toasters in 3 years, or other foolishness. Nobody cares if their toaster is controlled by Java or by a wind-up spring, providing it makes their toast. The bubble is already deflating at a rapid rate. Java is here to stay, but then so is Pascal. C++ isn''t going away for a long time. Oh, and there are still a lot of Cobol programmers out there.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!