How much quicker is public instance variable access compared to properties in Objective-C
<p>My company finishing up a new game engine which (like most engines) is very CPU intensive. It is written in Objective-C and most of the core game items which get accessed frequently are stored in object properties. Most of these are automatically synthesized and are simply stored and read.</p>

<p>How much speed, if any, would we gain by changing properties in the core game engine items to be public instance variables?</p>

<p>So whereas it would be declared and accessed like this with a property</p>

<pre><code>@property (nonatomic) CMLocation location;
node.location.x;
</code></pre>

<p>It would now be:</p>

<pre><code>@public:
   CMLocation location
node-&gt;location-&gt;x
</code></pre>

<p>Logically speaking, I think ivars would be much faster as it should be an almost single clock tick operation (assuming no cache miss), but perhaps the compiler tunes that sort of thing out now and synthesized properties are just as fast.</p>