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.
[ Parent
| on HN ]
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).