News for hackers. Stuff that matters.
Re:Friendship ended with the garbage collector by loup-vaillant on Friday August 27, 2021 @05:19AM (#28325754)
There's a huge difference between C/C++'s malloc() and a precise garbage collector: with the former all objects are fixed. With the latter you can move them around. This means malloc() is more constrained than a GC, and that makes it slower.

The real gains of managing memory manually is not in the speed of malloc(), but in the fact that in practice you can perform far fewer heap allocations.

There are no comments on this comment yet.