On Mon, Dec 18, 2000 at 01:11:12PM -0600, Jacques A. Vidrine wrote:
>   /* Case 1 */                               /* Case 2 */
>   if (data)                 vs.              free(data)
>           free(data);


Actually from an optimization standpoint, #1 can be worse (ie, harder on
the processor).  You've got a conditional jump there that is using branch
prediction HW to track (which means there is some other conditional
branch you're not, you're fetching both the taken and not take paths,
etc...  If the function call isn't expensive, #2 can be "faster".

-- 
-- David  ([EMAIL PROTECTED])
          GNU is Not Unix / Linux Is Not UniX


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to