Java Urban Performance Legends
An anonymous reader writes "Programmers agonize over whether to allocate on the stack or on the heap.
Some people think garbage collection will never be as efficient as direct memory management, and others feel it is easier to clean up a mess in one big batch than to pick up individual pieces of dust throughout the day. This article pokes some holes in the oft-repeated performance myth of slow allocation in JVMs."
I disagree with the first part of that statement. Java hands down wipes the floor with C++ even if you deck it out with STL and Boost++. Not only does it have libraries for all the usual things language runtimes provide, but encryption, UI, database, graphics, sound plus a raft of enterprise level libs.
You might be cobble together libs for C++ which do these things, but I bet they don't run cross-platform. Even the likes of OpenGL require some platform specific code.
I don't believe you will ever see a cutting edge game in Java (unless you consider 2D orthogonal Puzzle Pirates to be cutting edge), but I bet you a hell of a lot of MMPORG type games are using Java somewhere in the backend. In fact if I were doing an MMPORG I'd probably code up most of the back-end stuff in Java unless we were talking about a game which *really* hammered the server. Most games would have components for account maintenance, maps, NPCs, object databases, RNGs etc. I don't think it would be any trouble to run substantial chunks of that on Java.
When the fuck did you assholes show up in my industry? You're the reason I have to wait *seconds* when I click links on many major websites (read: J2EE websites). We live in the age of cable modems and fiber to the fucking curb... I shouldn't be surfing at dialup speeds whenever I happen across one of these 'miracles of modern engineering'. "Slight" performance increase for doing it the manly way? Bullshit! Bullshit, bullshit, bullshit!
Who the fuck is raising this generation to think that mediocrity is totally a-Okay, and that you shouldn't have to know anything about a computer to use (let alone program) it?
Let's take it in the other direction: why not have machine language, or assembly programmers, who would therefore be quite skilled (high barrier to entry)? Because their time is better spent doing things the compiler can do. C is mostly a glorified macro assembler language, relying on GCC to do the hard work. And Java is another step in that scale. Different people's organizations will find their balance in their own place. Generally, Java means programmers, even if they're really good, don't have to spend *any* time dealing with memory bookkeeping. So they're more productive. Now, some programs deal with problems closely modeled by memory bookkeeping, so they are worth writing in C (eg. pointer arithmetic). But generally business problems are better modeled in messaging schemas among objects than simple structures. If you're programming hardware solutions, C is probably better. But if you've got to choose between spending time designing/implementing memory de/allocation or message passing, Java is probably better. So you don't need programmers with memory de/allocation skills. They might have other skills, or just fewer skills, because the messaging has been designed by the architect or designer. And therefore the budget can afford a better architect/designer, which is usually more productive money spent.
--
make install -not war