[Gllug] Re: [OxLUG] C function strcasecmp
Alex Hudson
home at alexhudson.com
Sun Jul 22 21:28:41 UTC 2001
On Sun, Jul 22, 2001 at 08:43:34PM +0100, Nix wrote:
> *selfLART*
Careful now :)
> > Shifts should be _much_ faster than
> > multiplies on most Intel chips,
>
> I'm not sure *what* chip I was thinking of. I'll have to check the GCC
> sources :)
Certainly, gcc won't optimize multiplies to adds-and-shifts on the P4
because they're slower - Intel needed to do some transistor chopping, IIRC,
and implemented the barrel shifts in the ALU, hence each shift is worth a
muiltply.
Leads to interesting comparisons - most processors complete a shift in one
clock tick, the P4 (notwithstanding its pipelined-ness) takes 19 :)
Cheers,
Alex.
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list