4 ms·
In anything where Java approximates the speed of C++ it uses two or three times as much RAM.
by a8da6b0c91d 12y ago
In anything where Java approximates the speed of C++ it uses two or three times as much RAM.
- pkolaczk 12y ago10 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).