Linus Torvalds on Garbage Collection (2002)
gcc.gnu.org
Linus Torvalds on Garbage Collection (2002)
1–10 of 207 posts
Re: Linus Torvalds on Garbage Collection (2002)
#2Though his argument about cache does still hold.
Re: Linus Torvalds on Garbage Collection (2002)
#3[2002] Though his argument about cache does still hold.
Re: Linus Torvalds on Garbage Collection (2002)
#4[2002] Though his argument about cache does still hold.
Re: Linus Torvalds on Garbage Collection (2002)
#5[2002] Though his argument about cache does still hold.
I could see it holding for say Java or C#, but for a single assignment languages like SML or Haskell I don't think it would hold. It seems like changing single assignment to mutation would be one of the first memory related optimizations you would make. While it is easiest to think of that as A1 = A0 + B is a mutation of A, there is nothing that says it should be so limited.
It would not have to hold, but I have not heard of any such scheme being implemented.
Re: Linus Torvalds on Garbage Collection (2002)
#6[2002] Though his argument about cache does still hold.
For applications operating at a higher level, or where any calculation that's going on is taking up a trivial amount of CPU time compared to (say) waiting for the user, then the overhead of reference counting (and the mistakes that are associated with that) is probably not worth it.
Re: Linus Torvalds on Garbage Collection (2002)
#7Re: Linus Torvalds on Garbage Collection (2002)
#8It also doesn't allow circular data structures, which are quit hard to implement if all you have are strings anyway.
Re: Linus Torvalds on Garbage Collection (2002)
#9Re: Linus Torvalds on Garbage Collection (2002)
#10Might be worth mentioning Tcl in this context, as it uses reference counting for the GC [1]. It also doesn't allow circular data structures, which are quit hard to implement if all you have are strings anyway. [1]: http://wiki.tcl.tk/3096