[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Python's GC approach
At 03:24 PM 11/28/01, Paul Prescod wrote:
>Has anyone used the Boehm collector on multiple platforms in a
>multithreaded, embed-able interpreted language?
I think the Gwydion Dylan people use the Boehm collector, but it is
a compiled language. I wouldn't think the compiled vs. interpreted
would make a difference, tho'.
> > There are
> > customizations galore in the Boehm GC that allow you to give it extra
> > information about what you are doing, so if you are in the position of
> > having complete knowledge about memory usage you ought to be able to
> > avoid many of the problems you noted above. At the worst, you'd end
> > up writing your own GC.
>
>Writing your own GC seems easier than figuring out every bell and
>whistle to get Boehm working on every platform, in every configuration,
>with every third-party library and embedding application! Now that
>Python's GC is done I don't think that we ever have to really worry
>about "porting" it to a new platform or about conflicts with third party
>libraries. That seems simpler in the long run than using Boehm!
I have not myself tried to make the Boehm GC work on "every"
platform, so I trust that you are right when you say it is a headache
to configure it. Even so, writing a good modern high-performance
collector that does the right thing with respect to such things as
threads and cross-language calls is not simple. I certainly believe
that Python's GC works properly, but the experience some of us
had implementing Dylan at Harlequin led me to conclude that even
small improvements to the GC can have massive overall effects
on your system performance. IIRC, the Boehm GC compared
favorably to the Harlqn GC for quite a long time, even though the
Harlqn GC was, in some ways, tailor-made for the Dylan effort.
Perhaps the fact that Python is an interpreted language makes it
less sensitive to GC performance?
BTW, the ex-Harlequiners reading this mail have some friends who are
in a position to offer a high-performance, highly customizable collector,
if anyone is interested. Disclaimer: I don't know if they are selling
it for real money, charging for consulting, or what-not; I have no financial
stake in making this offer. I think they may be on the verge of open-
sourcing it. I don't know what platforms it runs on right now, but I would
guess that it runs on a variety of Unix-derivatives and it definitely runs
on various Windows platforms. It is in use in several commercial
products. t's probably simpler to deal with than the Boehm collector.
If anyone is interested, I will ask them to provide more details.