An interesting read for those moving into mobile development. They touch on ARC, traditional GC, and manual memory management. Warning, it is a looong article.

An interesting read for those moving into mobile development.  They touch on ARC, traditional GC, and manual memory management.  Warning, it is a looong article.
http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/

Comments

  1. Wow, you weren't kidding about the length. Good read though. My take away is that ARC probably falls somewhere between totally manual memory management and GC due to the need for atomic reference count updates. Regardless of memory management technique you employ it still boils down to an algorithm. Every algorithm has worst case scenarios where it will be outperformed by an alternative. Even bubble sort can outperform other sort algorithms given the right conditions.

    I've read some of the theory behind some of the alternatives to naive references counting (weighted rc, partial gc for cycles, etc) but never seen any of them in practice. I was working on a drop in naive reference counting memory manager for Delphi/FreePascal but didn't understand the problem domain well enough to make much headway.

    ReplyDelete
  2. ARC also has perfomance penalty. C++ way is better. All what you need is to use shared_ptr/weak ptr for pointers. when you really don't need ARC you can dont use it.

    ReplyDelete
  3. I'm not so sure. Manual memory management is a chore and a hassle. Even the most seasoned developers will slip up and create memory leaks. I'd much rather have automatic memory management as the default while making it easy to switch to manual for performance sensitive code.

    For the vast majority of programs the few nanoseconds won't make a difference.

    ReplyDelete

Post a Comment