Movatterモバイル変換
[0]ホーム
A couple garbage collector questions
Daniel Berlindan at www.cgsoftware.com
Fri Apr 20 02:24:58 EDT 2001
On Fri, 20 Apr 2001kragen at pobox.com wrote:> Neil Schemenauer <nas at python.ca> writes:> > Kragen Sitaker wrote:> > > Reference-counting exacts very heavy performance costs, no> > > matter what you back it up with.> >> > Can you back that statement up with any data?>> Not right now, sorry --- too busy. But if you happen to find data on> the other side, I'd be happy to hear about it.So, in other words, your answer is "no".As for data on the other side, i've never seen non-atomic referencecounting exact a huge performance penalty, in a well-designed application.INCREF is a macro that expands to (with depythonified equivalent names) :object->refcount++.DECREF is a macro that expands to (with depythonified equivalent names):if (object->refcount--) free(object)I'm pretty curious as to how you think this will exact a huge performancecost.Cache locality isn't hurt, why the heck would you decref an object youhadn't just used? Why the heck would you incref an object you weren'tabout to use?Branch prediction isn't an issue here, you'd have the same problem in anygarbage collection schemes.So where is the huge performance cost i'm paying?--Dan
More information about the Python-listmailing list
[8]ページ先頭