[lkml]   [2006]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] ext3_clear_inode(): avoid kfree(NULL)

    On Sat, 24 Jun 2006, Arjan van de Ven wrote:

    > >
    > > Because at that callsite, NULL is the common case. We avoid a do-nothing
    > > function call most of the time. It's a nano-optimisation.
    > but a function call is basically free, while an if () is not... even
    > with unlikely()...
    > sounds like a misoptimization to me.

    How is a function call free when an if is not? Especially if that
    function does the exact same if?

    The problem is that in these cases the pointer is NULL several thousands
    of times for every time it is not NULL (if ever). The non-NULL case is
    where an error occurred or something very special. So I don't see how
    the if here is a problem?

    -- Steve

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-06-24 14:23    [W:0.029 / U:2.372 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site