[Vm-dev] Performance of primitiveFailFor: and use of primFailCode
David T. Lewis
lewis at mail.msen.com
Mon May 23 23:30:09 UTC 2011
On Mon, May 23, 2011 at 02:33:52PM -0700, Eliot Miranda wrote:
>
> On Mon, May 23, 2011 at 2:08 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> >
> > Testing success status, original:
> > if (foo->successFlag) { ... }
> >
> > Testing success status, new:
> > if (foo->primFailCode == 0) { ... }
> >
> > Setting failure status, original:
> > foo->successFlag = 0;
> >
> > Setting failure status, new:
> > if (foo->primFailCode == 0) {
> > foo->primFailCode = 1;
> > }
> >
> > So in each case the global struct is being used, both for successFlag
> > and primFailCode. Sorry for the confusion. In any case, I'm still left
> > scratching my head over the size of the performance difference.
> >
>
> One thought, where are successFlag and primFailCode in the struct? Perhaps
> the size of the offset needed to access them makes a difference?
In both cases they are the first element of the struct, so that
cannot be it.
I think I had better circle back and redo my tests. Maybe I made
a mistake somewhere.
Thanks,
Dave
More information about the Vm-dev
mailing list