A couple garbage collector questions
Jeff Petkau
jpet at eskimo.com
Sat Apr 21 03:32:46 EDT 2001
Daniel Berlin <dan at www.cgsoftware.com> wrote in message
news:mailman.987747988.15494.python-list at python.org...
>...
> Cache locality isn't hurt, why the heck would you decref an object you
> hadn't just used? Why the heck would you incref an object you weren't
> about to use?
>
> Branch prediction isn't an issue here, you'd have the same problem in any
> garbage collection schemes.
>
> So where is the huge performance cost i'm paying?
> --Dan
On some modern processors, reference counting could actually be
faster than no memory management at all--the incref basically
acts as a prefetch, for suitably sized and aligned objects.
Of course that's just random speculation, but isn't random
speculation is what memory management arguments are all about?
--Jeff
More information about the Python-list
mailing list