[Gllug] Re: [OxLUG] C function strcasecmp
Alex Hudson
hudson_a at alexhudson.com
Sun Jul 22 17:31:05 UTC 2001
On 22 Jul 2001, Nix wrote:
> This is target-specific. GCC will rewrite adding and subtracting 32 into
> bitwise logicals, but it won't, on some architectures (e.g. i586)
> rewrite multiplications by 2 into shifts, because the shifts can
> actually be slower.
Are you talking about the P4 here? Shifts should be _much_ faster than
multiplies on most Intel chips, except the (current) P4, on which it is
the same speed. Hence gcc wouldn't optimize a multiply into a number of
shifts and adds, although turning a multiply by two into a shift wouldn't
hurt much.
Cheers,
Alex.
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list