@interface Person : NSObject
@property(nonatomic, assign) CGFloat salary;
@end
@implementation Person
- (void)addSalary:(CGFloat)s
{
_salary += s; **//method 1**
self.salary += s; **//method 2**
}
@end
I wonder which is more efficient between method 1 and 2? Would the compiler do some optimisation work to make them have the same performance?