Re: [patch] IBM HDAPS accelerometer driver, with probing.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"David S. Miller" <[email protected]> writes:

> From: Alexey Dobriyan <[email protected]>
> Date: Sat, 27 Aug 2005 02:58:48 +0400
> 
> > What's the point of having unlikely() attached to every possible if ()?
> 
> If can result in smaller code, for one thing, even if it
> isn't a performance critical path.

Really? At least on x86 it tends to generate bigger code when 
block reordering is enabled because a jump forward and a jump
backward and a possible label alignment are bigger than just
a single jump forward. But then it doesn't make that much difference
because the compiler does it on its own for every block.

On x86-64 I keep it disabled because:
- it generates bigger code
- it makes the assembly code unreadable
- it doesn't seem to help that much on modern CPUs with good
branch prediction and big icaches anyways.

-Andi (who originally introduced likely/unlikely, but regrets it these
days because it's far overused and makes code uglier everywhere)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux