News for hackers. Stuff that matters.
Re:An Opinionated Guide to Modern Java Development, Part 1 by zenbowman on Thursday May 01, 2014 @04:00PM (#7682366)
Exactly. I'd argue C++ has a lot going for it, and I think the claim that Java's performance is only slightly slower is simply not true for the vast majority of situations where good memory organization can provide significant speedups - which includes any computer graphics, vision or audio application.

I personally find C++11 more high-level than Java and significantly more optimizable for performance.

You can wax poetic about "developer time is more important than processor time" all you like, but when your application runs like a turtle on anything short of server-class hardware, it doesn't mean much.

Performance will always be of primary importance for a large class of applications. For the rest, Java is a good alternative.

Re:An Opinionated Guide to Modern Java Development, Part 1 by pkolaczk on Friday May 02, 2014 @10:50AM (#7686006)
Java is fast enough now to compete with C++ in some categories of software traditionally viewed as "high performance" e.g. web-servers or database systems. Applications running like "turtle on anything short of server-class hardware" is a result of bad-coding, not Java itself.
Re:An Opinionated Guide to Modern Java Development, Part 1 by zenbowman on Friday May 02, 2014 @03:08PM (#7687517)
In some categories, yes.

In many others, especially those requiring vector or matrix arithmetic (medical imaging, physical simulations, modeling, graphics, scientific computing, video games), there's simply no competition.

Re:An Opinionated Guide to Modern Java Development, Part 1 by pkolaczk on Friday May 02, 2014 @04:05PM (#7687819)
Not sure of that. Some scientists from CERN would certainly disagree... Pure array-based arithmetic in Java is pretty damn fast, especially if you care to avoid dynamic allocations. It can be also very memory/cache friendly.
Re:An Opinionated Guide to Modern Java Development, Part 1 by zenbowman on Saturday May 03, 2014 @11:18AM (#7691077)
I was under the impression CERN was a C++ shop, have they switched over to Java?
Re:An Opinionated Guide to Modern Java Development, Part 1 by pkolaczk on Saturday May 03, 2014 @02:28PM (#7691851)
They do have quite a few projects in Java and they published some of their Java scientific libraries as open source. See Colt project. Also the software processing data from LHC is at least partially Java based.
Re:An Opinionated Guide to Modern Java Development, Part 1 by a8da6b0c91d on Friday May 02, 2014 @03:51PM (#7687739)
In anything where Java approximates the speed of C++ it uses two or three times as much RAM.
Re:An Opinionated Guide to Modern Java Development, Part 1 by pkolaczk on Friday May 02, 2014 @04:11PM (#7687851)
10 millions element array of doubles/ints/bytes takes almost exactly same amount of bytes in Java as in C++. Java can blow your memory if you do stupid things like wrapping every point 2D into a separate object, but you know, good Java programmers know this. Other than that, its memory usage is quite reasonable, including some room for GC (typically 20-30% of total is enough).