A question/suggestion regarding the GC

bearophile bearophileHUGS at lycos.com
Sat Sep 20 13:58:15 PDT 2008


Jarrett Billingsley:

>Congratulations, you've figured out how conservative GCs work.<

Thank you. I don't know if you are trying to be sarcastic, but for me this stuff isn't obvious as it is for most of you here. Anyway, I'm sure that with time I'll understand those topics.


>This information would be embedded in the typeinfo at compile time, not figured out at runtime.<

But isn't this impossible? There are dynamic casts too.


>Geez, if you're looking for performance...<

If you are willing, you may explain me why doing it at runtime may significantly damage the general performance of general D code.


>But the number of pointers to non-GC'ed memory is so minimal that it's most likely not a problem.<

Okay (in some of my programs I use mostly the C heap, so I presume my code is not common).


>D can never have a precise GC because of unions, sadly.<

But what I have tried to express is that there can be levels of precision, and even if some sources of approximation can't be avoided (or are too much difficult to avoid) there can be ways to remove some other of them. A more precise GC may be better than a less precise one, even if both of them aren't fully precise :-)


>But SafeD could have a precise GC.<

I hope to see this, but I think there are some people that like D that think that having two different GCs running at the same time is too much complext, etc.


>The performance effects, however, are a bit more complicated than "I think it's not going to be a problem."<

Sure. I have just started understanding this topic.


>You have a way with being unconvincing in your proposals.<

I presume it's the way I am. On the other hand I don't like people that are both bold and ignorant, etc. So in the D community there are people way worse than me ;-)

Thank you,
bearophile


More information about the Digitalmars-d-learn mailing list