Glad it's settled that the difference is insignificant. I've always been
coding using "symmetry" -- that is if I use MemHandleLock then I use
MemHandleUnlock, even though I could use MemPtrUnlock as well.
--
Michael Yam
www.ytechnology.com
[EMAIL PROTECTED]
Bob Ebert <[EMAIL PROTECTED]> wrote in message
news:8082@palm-dev-forum...
>
> At 1:56 AM +0100 8-04-00, Paul Nevai wrote:
> >According to the MemoryMgrNew.c, MemHandleUnlock does not call
MemPtrUnlock,
> >although it performs a similar function. Best regards, Paul
>
> True, but the actual 'lock' counter is stored in the chunk, which is
> accessed via the pointer. So MemPtrUnlock is VERY slightly faster,
because
> it does not need to dereference the handle.
>
> Note that this will NEVER be a performance bottleneck for your code, so
you
> shouldn't care. If you happen to have both the handle and the pointer
> lying around in registers, use the pointer. Otherwise, use whichever is
> most convenient.
>
> If you find yourself optimizing at this level, you need to remember that
> you can't optimize too soon. :-)
>
> --Bob
>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html