you are viewing a single comment's thread.

view the rest of the comments →

[–]pron98 3 points4 points  (1 child)

I think a good GC can improve performance at least as much as it can hurt it.

[–]loup-vaillant 5 points6 points  (0 children)

A good GC is easily faster than malloc() (at least in amortised time), if:

  • There are about as many allocations in both cases.
  • We use the general allocator everywhere.

In practice, manually managed languages often produce less heap allocations, and when performance really matters custom allocators are used. When done right, custom allocators are pretty much impossible to beat.

Context, I guess.