RestKit/RestKit — pull request #2092 by carllindberg (2014-11-14 20:34:39+00:00)
Title: Use local variables in RKMappingOperation to avoid multiple calls to methods

I was a little surprised at how much #2086 helped with the #2065 issue, so I experimented with caching the delegate and dataSource respondsTo results, and got only a negligible speedup. So now I'm guessing that avoiding the ivar access (which is slower with ObjC 2, and since caching the respondsTo simply changed a method call into a local ivar reference) was actually the big speedup there, not necessarily avoiding the objective C method calls.

So, I went through RKMappingOperation again to add some more local variables in cases where we were going to be calling a property at least once and possibly more than that, to see how much more it helped. For the test app, it isn't much, but I guess anything helps. CoreData mappings may have been helped slightly more since a few were in those areas.

Timings before:
(Device) Mapping 5000 students with relationship mapping: 14.274493
(Simulator) Mapping 5000 students with relationship mapping: 1.967516

Timings after:
(Device) Mapping 5000 students with relationship mapping: 14.170651
(Simulator) Mapping 5000 students with relationship mapping: 1.921922