ARC vs MRC(従来のretain/release)に関するベンチマークと考察。
様々な速度比較が行われているがほとんど差は無い。
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjknt6dt288nzxjzLW4HM26LT31pFDa-Qv84LDt8SM9Fe7lQHa6Z6PrkuPqK_O_G0r6cjjm1EMdAUgIUR9rB6vxipDmLTayAa8nIIhMN8-1RwlZif-M9gzMQSdumgbOlKCrsm8LADoLYv6i/s320/130328-0008.jpg)
ARCが遅くなると思われるケース
// this is typical MRC code: { id object = [array objectAtIndex:0]; [object doSomething]; [object doAnotherThing]; } // this is what ARC does (and what is considered best practice under MRC): { id object = [array objectAtIndex:0]; [object retain]; // inserted by ARC [object doSomething]; [object doAnotherThing]; [object release]; // inserted by ARC }
// this is typical MRC code: -(void) someMethod:(id)object { [object doSomething]; [object doAnotherThing]; } // this is what ARC does (and what is considered best practice under MRC): -(void) someMethod:(id)object { [object retain]; // inserted by ARC [object doSomething]; [object doAnotherThing]; [object release]; // inserted by ARC }
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIVOzVW8UztMj40Sni_PvIhM6oVfvF3mXZ_NfnMLqEkzFaX73r__E69PHX1Ce-YeOqfPSgU_nui_7Z8sYeUHrBL_SY4zzVhmEFM_GI5a1KXTcvNQpGsmW4tma9HukzXLFUxBh5OlNPI7jH/s320/130328-0009.jpg)
最後はそんなに速度が気になるならCで書けよ、みたいな(それを言ったら見も蓋もないが..)。