Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Scala consume 2-3x more RAM than competitors in the Computer Language Benchmarks Game?

Is it related to garbage collection? It just seems odd that it performs so well in all other areas and fails miserably on memory consumption.

Link: http://benchmarksgame.alioth.debian.org/u32/scala.html

like image 430
Mark Avatar asked Aug 29 '11 03:08

Mark


1 Answers

Without addressing each case, in general, Scala is happy to create many objects, both small and large, to make your life easier. If you specifically program to have a small memory footprint, then Scala can be only slightly less compact than Java. Otherwise, if you're trying to make the program fast and easy to code (but you don't specifically pay attention to memory), it'll tend to be larger.

If anyone wanted to create small-memory-footprint versions of the programs and submit them, I'm sure they'd be accepted.

like image 158
Rex Kerr Avatar answered Nov 15 '22 07:11

Rex Kerr