Why does Scala consume 2–3 times more RAM than its competitors in the Benchmarks computer game?

Is this related to garbage collection? It seems strange that it works so well in all other areas and fails miserably in memory consumption.

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

+6
source share
1 answer

Without addressing each occasion, in general, Scala is happy to create many objects, both small and large, to make your life easier. If you specifically plan to have a small amount of memory, then Scala may be slightly less compact than Java. Otherwise, if you try to make the program quick and easy to encode (but you do not pay much attention to memory), it will be more.

If someone wants to create versions of programs with a small amount of memory and send them, I am sure that they will be accepted.

+9
source

Source: https://habr.com/ru/post/896098/


All Articles