Thank you very much, Ian. You gave me a deeper understanding of Golang's internal :-D
On Wednesday, July 28, 2021 at 6:23:02 AM UTC+8 Ian Lance Taylor wrote: > On Tue, Jul 27, 2021 at 4:56 AM rmfr <remus.cl...@gmail.com> wrote: > > > > Hi, I'm reading the GC implementation of Golang, and some questions have > come to me. As the title described: > > > > Proposition 1: > > The time cost of the mark phase in GC is mainly depending on the amount > of the living objects. > > > > Proposition 2: > > The time cost of the mark phase in GC has very little to do with the > amount of unused objects. > > > > Do both propositions above is true? Thanks a lot. > > Yes, both statements are generally true. > > That said, since Go's garbage collector runs concurrently with the > rest of the program, it's a little hard to know what "the time cost of > the mark phase" is. But it is true that in general during marking the > GC only looks at live objects. > > Ian > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/43f75cf1-2762-4aff-a29d-a8411f6cba91n%40googlegroups.com.