开发者

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

开发者 https://www.devze.com 2023-04-01 12:40 出处:网络
Is it relat开发者_如何学Pythoned to garbage collection? It just seems odd that it performs so well in all other areas and fails miserably on memory consumption.

Is it relat开发者_如何学Pythoned 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消