Linked by ebasconp on Fri 10th Jun 2011 22:22 UTC
Permalink for comment 477082
Member since:

And of course, I'm sure I don't have to repeat it here because it is common knowledge these days. But with RAM and CPUs as cheap as they are these days, it's far more economical to throw another CPU, or throw more RAM at the problem, than it is to spend even a couple of hours trying to heavily optimize code to get just a little more speed or a little less memory consumption out of it.

A little more speed? A little less memory consumption?

A popular Java program these days is Minecraft. I love it myself. But it has cases where, when memory consumption hits 700 MB or so, the game gets insanely choppy. This is the garbage collection happening. It sucks. It's unusable.

To fix it, the recommendation is to run the 64-bit server JVM and let it use a gigabyte of RAM.

A whole gigabyte, to hold a chunk of active blocks which, if stored in a well-thought out C++ data structure, would only take a hundred megabytes or so.

Reply Parent Score: 2