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

Re: Why you are wrong [Was: On linux kernel packaging issue]



I demand that Adam Heath may or may not have written...

> On Mon, 10 Nov 2003, Joe Wreschnig wrote:
>> A program that is CPU-bound *and* can be encoded more efficiently will
>> benefit from compiler optimizations. Some CPU bound things just aren't
>> going to be helped much by vectorization, instruction reordering, etc. I
>> mean, integer multiply is integer multiply.

> But if the target cpu supports pipelining, and has multiple multiplication
> units(which means it can do them in parallel), or can do a 128bit multiple,
> or 1 64 bit multiple, at once, then it's more efficient to do a partial
> loop unroll, and thereby have faster code, because of more efficient
> parallization.

Converting some multiplies to shifts (or shift plus some other arithmetic),
or arranging that one of the source registers normally contains the lower
value, can also help. (At least, on ARM...)

-- 
| Darren Salt   | linux (or ds) at | nr. Ashington,
| woody, sarge, | youmustbejoking  | Northumberland
| RISC OS       | demon co uk      | Toon Army
|   I don't ask for much, just untold riches...

This tagline was stolen by the International Brotherhood of Tagline Thieves.



Reply to: