[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Python's GC approach

Scott McKay wrote:
> 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'.

I don't think it would make much of a difference except that interpreted
languages tend to be added to existing systems written in compiled
languages. It only takes a couple of lines of code to add a Python or
Jython interpreter to a C or Java app. So "playing well with others" is
an extremely high priority.

> 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.  

I haven't tried it myself. All I have is the common wisdom from the
Python world:

"It has bits of assembler
code for most common platforms. Not for all. And although it is mostly
transparent, it isn't completely transparent (when I once linked Python
with it, it dumped core)."

Maybe if Python had been designed for Boehm from the start it would have
done better.

> Perhaps the fact that Python is an interpreted language makes it
> less sensitive to GC performance?

Yes, that's true. On the other hand, the only approaches we've attempted
to making threading work across processors seemed to have very large
performance hits. Maybe Boehm would handle that better.

 Paul Prescod