[LLVMdev] open source multithreaded garbage collector suitable for LLVM applications?
Andrew Haley
aph at redhat.com
Sat May 2 01:33:30 PDT 2009
Basile STARYNKEVITCH wrote:
> Does any know about some opensource multithread-compatible (or
> concurrent) garbage collector library, if possible suitable for LLVM?
>
> (I mean that I want several mutator threads; the collector can be
> stoptheworld or concurrent ....)
>
> H.Boehm's conservative GC is multithread compatible, but seems quite
> slow (allocation is about the time of a C malloc).
It's true that the allocation path in the Boehm GC isn't as fast as
some, but overall I don't think that the collector itself performs
badly. It's been carefully tuned over many years on a wide range
of systems, and I think it's extremely unlikely that a much simpler
approach will in generally result in better performance.
It's ferociously hard to benchmark things like this, because it all
depends critically on the allocation pattern of your application.
A tuned precise copying collector such as those used in the HotSpot
VM might do better than a more general-purpose tool, as you'd expect,
but it will need accurate type information to do so.
Andrew.
More information about the llvm-dev
mailing list