[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: following up on speed
Michael Vanier wrote:
>
>I don't think the STL obviates the need for GC except in comparatively
>simple cases. This is the biggest current weakness in C++ as far as I'm
>concerned, although it is a fixable weakness. Even Bjarne Stroustrup has
>said many times that he believes in the usefulness of optional GC, but the
>C++ standard hasn't embraced this yet (probably because of the extreme
>machine-dependence of GC, although you could still define a standard
>interface to a GC).
>
Based on my own discussions with Stroustrup, I've found him to be a very
intelligent and thoughtful
person who is quite willing to listen to new ideas. (The ones who were
really dogmatic and defensive
were a subset of the next-level-down C++ people, but not Bjarne himself.)
One argument one often hears about GC is that it has bad realtime
characteristics, even in the
case of incremental GC's: that a GC can happen any time you allocate,
and there's no upper
bound on how long it can take. People making this argument often seem
to be tacitly implying
that "malloc" and "free" *do* have some kind of tight upper bound; but
generally they don't!