What's wrong with mark-and-sweep GCs?

后端 未结 3 958
天涯浪人
天涯浪人 2021-02-02 03:01

I\'m reading Steve Yegge\'s \"Dynamic Languages Strike Back\" talk, and in it he sort of criticizes mark-and-sweep GCs (about 5-10 percent through that link, the \"Pigs attempt\

3条回答
  •  青春惊慌失措
    2021-02-02 03:23

    Here's the context of the quote:

    Generational garbage collectors is the best answer I've got for that, because it reduces the pauses, and frankly, the garbage collectors for all the [new] dynamic languages today are crap. They're mark-and-sweep, or they're reference counted.

    From the quote, he appears to be talking about fairly primitive GCs which aren't generational. Generational GCs can still be mark and sweep, but they have a lot less to mark most of the time, which makes them a lot faster than "mark and sweep the world every time".

    Assuming that's what he meant, I agree - but he could have put it more clearly. Bear in mind that this was a talk rather than a doctoral thesis though - coming up with the clearest possible way of expressing yourself "on the hoof" is kinda tricky :)

提交回复
热议问题