advertisement

Article:
  Knowing When to Let Go: Better Living Through Memory Management
Subject:   is simpler slower?
Date:   2003-06-16 16:11:16
From:   iapole
Response to: is simpler slower?

I believe the PPC's branch prediction is good enough to make that fast, but faster still will probably be:


-(void)setFriend:(id)aFriend
{
[aFriend retain];
[friend release];
friend = aFriend;
}


Which avoids the releasing problem. But keep in mind that this is all subjective, I have done absolutely no tests of efficiency regarding these.