Messages in this thread | | | Subject | Re: [PATCH] remove redundant NULL pointer checks prior to calling kfree() in fs/nfsd/ | From | Arjan van de Ven <> | Date | Sat, 26 Mar 2005 09:34:00 +0100 |
| |
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/
| |