lkml.org 
[lkml]   [2005]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] remove redundant NULL pointer checks prior to calling kfree() in fs/nfsd/
    From
    Date
    On Fri, 2005-03-25 at 17:34 -0500, linux-os wrote:
    > On Fri, 25 Mar 2005, Jesper Juhl wrote:
    >
    > > (please keep me on CC)
    > >
    > >
    > > checking for NULL before calling kfree() is redundant and needlessly
    > > enlarges the kernel image, let's get rid of those checks.
    > >
    >
    > Hardly. ORing a value with itself and jumping on condition is
    > real cheap compared with pushing a value into the stack

    which century are you from?
    "jumping on condition" can easily be 100+ cycles, depending on how
    effective the branch predictor is. Pushing a value onto the stack otoh
    is half a cycle.

    Your argument was right probably in 1994, when cpus didn't do
    speculation and out of order execution...


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-04-06 13:30    [W:0.019 / U:89.320 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site