Re:Should I Learn Java in 2018
by sirk390 on Friday July 13, 2018 @08:28AM
(#17522318)
It's disrespectful to take 4GB if you don't need it. This should never be the default...
[ Parent
| on HN ]
Re:Should I Learn Java in 2018
by bloomthrowaway on Friday July 13, 2018 @08:45AM
(#17522436)
It's the default because in any garbage collected language you can delay taking out the trash as long as you want... as long as you have memory. The most efficient thing to do is never run the collector at all.
JS does frequent GC cycles because its unacceptable to let a webpage eat all the ram. Not sure why Go collects so frequently. Java's default IMO is the most reasonable of the three. If you have a server with 4gb the best choice is to let the garbage collector use all of it