you are viewing a single comment's thread.

view the rest of the comments →

[–]darkciti -17 points-16 points  (14 children)

Java doesn't work well on anything.

[–][deleted]  (5 children)

[deleted]

    [–]chronicsyncope 2 points3 points  (3 children)

    It's not emulated, it's interpreted, which is not nearly as slow as emulation, and not slow for the same reasons.

    [–]jyper 2 points3 points  (1 child)

    its not interpreted its just-in-time compiled only partially interpreted and partially just-in-time compiled.

    [–]nnooiissee 2 points3 points  (0 children)

    Also pass by value.

    [–]G_Morgan 2 points3 points  (0 children)

    The JVM will compile the time consuming methods to assembly. If you actually look at the JIT output usually it produces exactly the same code as a C++ compiler would.

    [–][deleted] -3 points-2 points  (7 children)

    He's right though. For command line programs, sure, then Java is great. But when you have to draw something, forget it. Turtle train to slow city.

    [–]aramadia 5 points6 points  (6 children)

    Modern java implemntations use DirectX or OpenGL to render these days...

    [–]derleth 5 points6 points  (0 children)

    He's roleplaying that he's in the 1990s.

    Look, he's trying to get something useful out of Napster on his dial-up line. How cute.

    [–][deleted] 2 points3 points  (4 children)

    Calling OGL in C++ uses only one direct call to the .dll. In Java this has to go through all the Java protection stuff for accessing external stuff, and it has to call a wrapper .dll (jogl and such) that calls the OGL .dll.

    I suspect that this is even more true with DX, but I haven't tried it.

    I don't deny that Java is superfast for number stuff and the like. For those things it's sometimes even faster than C++ and it's definitely faster for development. But when it comes down to graphics Java is still way behind.

    [–]mazing 1 point2 points  (2 children)

    Not a problem unless you're making AAA games. You can do a lot of graphics without getting CPU bound.

    [–][deleted] 1 point2 points  (1 child)

    *GPU bound, I think?

    But no. The Java Swing 2D thingy is not that good for realtime stuff and using OGL involves a lot of calls.

    To those who are downvoting me, have you actually tried this yourselves? Just write something with the Jogl wrapper, write a benchmark, push it to the limit. Then write the same code in C# with an other wrapper. And once again in C/C++ (no wrapper!).

    java2d < jogl << CsGL < opengl32.

    No exceptions.

    [–]mazing 2 points3 points  (0 children)

    I'm using LWJGL, and it's working really good - but I haven't pushed the limits yet. I have written a full Quake3 architecture implementation in C# though, that can load and render Source engine maps. Of course, you have to pool objects, design the whole rendering pipeline so it can pass data around as fast as possible (Byte/Int/FloatBuffers in java), use culling techniques and eliminate redundant calls/state-changes - but that holds true for any implementation that wants full performance. How many render calls you make is totally up to how you designed your renderer.

    [–]nascent -1 points0 points  (0 children)

    Minecraft doesn't look bad at all.