Subject: Re: C runqueue
To: David Laight <david@l8s.co.uk>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: port-i386
Date: 10/23/2002 08:16:39
On Wed, Oct 23, 2002 at 09:35:13AM +0100, David Laight wrote:

 > IIRC the P4 doesn't have a barrel shifter (easily accessible)
 > so rotates (etc) by cl and constants (other than 1) are slower
 > than on other processors.

And, thankfully, these are the sorts of things that compilers know
about, so you can produce optimized code for whichever CPU model
you're targeting.

We should be striving for more code in C for precisely these reasons
(except for obvious things like e.g. in_cksum() where the compiler
is not likely to have enough smarts to take advantage of all the
tricks a CPU might have available).

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>