5 ms·
It's not using ARC. Is this legacy code, or couldn't they get equivalent performance with ARC enabled?
by alayne 13y ago
It's not using ARC. Is this legacy code, or couldn't they get equivalent performance with ARC enabled?
- mallorypaine 13y agoHello. Mallory Paine here. I wrote FIC. This is not legacy code...it should be trivial to convert it to ARC and performance should be unaffected. I'm a bit old school myself so I chose to write it with manual retains. Does this approach make the code more difficult for you to use within an ARC project?
- nielsbot 13y agoIt might even be faster under ARC since I think the compiler can optimize some retain/release calls. I think the ARC retain and release may be faster than -retain/-release, but I'm not sure about that. Overall, yes, it's less smooth to include non-ARC code in an ARC project.
- jdewald 13y agoI was under the impression that ARC simply inserts the retain/releases into the code essentially write before the compile, so in theory would be equivalent.
- LinaLauneBaer 13y agoARC inserts the retain/release calls but once that is done there is an additional step where duplicate retain/release pairs are eliminated.
- allsystemsgo 13y agoWhy would you write it with manual retains? Who doesn't use ARC at this point?
- rbritton 13y agoIf the rest of the project is non-ARC it's easier in my experience to write new additions that way as well. I've only been using ARC on newly-created projects because having to add -fobjc-arc or -fno-objc-arc to dozens of files in Xcode is very, very tedious.
- hboon 13y agoYou can do a search to filter files in Xcode as well as cmd-click to select multiple files, the double click and enter the flags once for all of them.
- cclogg 13y agoActually you have my support for going manual. I still prefer to do all my projects without ARC (and I'm not old-school, unless 2009 is old-school). I just feel dirty everytime I use ARC, like I'm being sloppy haha. It also hides a lot about memory management that new people might never learn (and thus be in bigger trouble when something does go wrong). But I accept that it does have major advantages... One trouble now is you never know if a library or whatnot will be ARC so it fragments things somewhat.
- alayne 13y agoIt wouldn't be our only non-ARC framework. It might be interesting to benchmark an ARC version though.
- aaronbrethorst 13y agomeh. It's a bit odd, and I don't understand why someone would choose to manually manage memory, but -fobj-arc and -fno-objc-arc are handy ways to manage ARC and non-ARC files in your projects, depending on what your yen for -retain and -release are.
- lucastizma 13y agoAs of Fast Image Cache 1.1, we now use ARC. Profiling it both ways, I didn't observe any noticeable changes to performance.