On Wed, Jan 18, 2012 at 5:05 PM, clay <[email protected]> wrote: > I've wrote a Java app that loaded millions of records, ~2.5GB on disk, > into memory, and ready to be analyzed in about 3-4 seconds on my > laptop on a warm run. Cold runs took a little longer, I forget the > exact time, but it was in the 5-12 second range. The main trick was > storing my data by columns rather than by rows. Using the right NIO > API you can read massive arrays of primitives (int[], long[], float[]) > directly from disk into memory without any Java loops. I imagine this > was completely bound by OS level I/O operations. Conceptually, I don't > see how you'd squeeze more performance out of this with C-style > casting and memory copies. My point is that sometimes you can find > high performance tricks even in Java to do the types of tasks you are > talking about.
I am willing to bet dollars to donuts that your laptop is a bit more capable than the machines that are targeted here. And, again, read what you wrote. You read massive arrays of *primitives* into memory. Now... what if that primitive was an image and you'd like to treat it as such? In java, you're hosed. It is getting copied to the heap. In C#, it appears, you can avoid this copy and just treat the data as what you know it is. Or, do you think the answer to writing high performance sections of code is that everything has to be a primitive throughout your app? (Remember, as soon as you make it an object in java, it is copied to the heap.) Not to mention in C# it is just a lot easier to interface with C/C++ code directly. > It seems like there is a decided lack of enthusiasm about Java and the > JVM ecosystem. People are just searching for reasons why it isn't > good. Does anyone want to see it improve and broaden it's usefulness? > I don't know what to tell you. Game developers by and large avoid Java. I think if you honestly want a good answer as to why, ask them. It seems rather clear that none of us are game developers. I've given my overall opinions, but they can only go so far. And, as much as I used to fear all things Microsoft, I still maintain this was not a ploy to attract Microsoft developers. This was acknowledging that toolsets such as Unity3D already exist and have a C# API. Why not leverage the hobby groups that currently exist? Also, it isn't like anyone here dismisses the JVM. We just can't offer any compelling reason why game developers should choose it over alternatives. -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
