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
@freemo i did have some curiosity about the arena allocators for application servers, but that's going so far against the grain you end up having to code the entire framework yourself :blobcatgrimacing:

but.. no memory leaks ever that way, so that's fun :blobcatgooglybadumtss:
Follow

@icedquinn If you use C and traditional malloc and free calls to allocate memory as needed on a per object basis, it is actually **significantly** slower than Java's GC and memory allocation, for example.

If you use a library to pre-slate your memory and do a few really special stuff (thus removing you from access to malloc directly) you will get speeds comparable to Java at best.

You would have a really hard time beating Java's GC manually.

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.