Messages in this thread | | | Date | Sat, 22 Apr 2006 13:56:01 +0200 | From | Jörn Engel <> | Subject | Re: kfree(NULL) |
| |
On Fri, 21 April 2006 13:30:30 -0700, Vernon Mauery wrote: > > A simple NULL check is faster > than a function call and then a simple NULL check.
I am not sure whether this is still true for any non-ancient CPUs. The cost of a branch misprediction is in the order of _many_ predictable instructions. That makes conditionals more expensive than they used to be. And the cost of branch mispredictions keeps increasing.
Jörn
-- You can take my soul, but not my lack of enthusiasm. -- Wally - 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/
| |