really the big sin of java and .net's GC is they keep wanting to pretend they don't exist. a GC should always be explicit. let me know you are going to stop the world so i can immediately go fail the health check and stop routing jobs to me while i clean up my gigabyte stack of shit

@icedquinn Not sure I agree. The whole point of the GC not being explicit is to reduce human error, and it does a good job at that. Java performance compared to many other interpreted languages is exceptional (not so much .net).

You also do have the ability to "suggest" the invocation of garbage collection should you need to add some explicit control to speed things up. but it rarely makes much of a difference.

@freemo they stop the world without telling the process, which is the sin. nim used an incremental gc (until they rewrote it all to use refcounting :blobcatshrug2:) so we could collect between game frames. the hoard of c# games doesn't scavenge time when its opportune and just framedrops at random ass times.

there's a lot of deployments where its actually fine for the GC to stop the world, it just needs to tell the load balancer about it ahead of time
Follow

@icedquinn @freemo I remember reading that Erlang has a funny way of handling that. It has a stop-the-world GC, except it's per process and Erlang is optimised to handle things with a crapton of small processes with small heaps. So your program cleans up tiny patches of garbage all the time, each process fast enough to be imperceptible.

I always wanted to make something in Erlang but never had a good project idea that fits it. Elixir also sounds interesting but again, wtf do I use it for, I'm not about to start implementing an nth Pleroma.

@Amikke

Java has several GC options that wont stop the world and ones that are super low latency as well as ones that are time constant (takes the same time to freeup a 100 TB heap as it does a 1KB heap)..

It is quite extrodinary how performant the Java GC is, out of all the memory managed languages it is probably the most efficient, if you know how to use it.

@icedquinn

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.