Re: kernel optimization

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

 



----- Original Message ----- 
From: "Adrian Bunk" <[email protected]>
To: "christos gentsis" <[email protected]>
Cc: <[email protected]>
Sent: Friday, July 22, 2005 16:14
Subject: Re: kernel optimization
>
> It's completely untested.
> And since it's larger, it's also slower.

Larger does not always mean slower.  If it did, nobody would implement a
loop unrolling optimization.

ex. Look at how GCC generates jump tables for switch() when there's about
10-12 (or more) case's sparsely scattered in the rage from 0 through 255.
It generates a 256 element directly indexed jump table (obviously with many
duplicate entries).  This is faster than a cascaded if/else
construct(particularly for those that would have been on the end of the
if/else chain), but it is a very large construct.  You'll see some of these
"plump" switches generated in various SCSI drivers and in the VT102
emulation if you disassemble them.


-
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