Java > Scala
Isaac Gouy
igouy2 at yahoo.com
Sun Dec 18 16:41:12 PST 2011
> From: Somedude <lovelydear at mailmetrash.com>
> To: digitalmars-d at puremagic.com
> Sent: Sunday, December 18, 2011 4:02 PM
-snip-
> It's very dependant on how you program of course, but I'd say the
> ballpark is usually at least an order of magnitude more. Java wastes a
> LOT of memory.
Note the additional caveats for the benchmarks game memory-use measurements:
1) "Don't confuse differences in default memory allocation with differences
in Memory-used when the task requires programs to allocate more than the
default memory."
For example,
default allocation
n-body Java -server 16,784KB
n-body C++ GNU g++ 356KB
more than default allocation
reverse-complement Java -server 313,080KB
reverse-complement C++ GNU g++ 245,668KB
2) "Notice that some of the programs are written for multicore and
include code to distribute work across multiple threads (or processes)."
For example,
mandelbrot Java -server 68,140KB
mandelbrot C++ GNU g++ 32,228KB
3) More generally, the program contributors are probably trading memory for speed, so the memory use measurements are more like an indicator of that trade-off than a statement about memory use.
More information about the Digitalmars-d
mailing list