|
Re: Which is faster?
Nate, x86 has a built in divide instruction, while the PIC does not, so I'd expect both to be similar in number of instructions on x86 but not on the PIC. You didn't say how long each took though, because the divide instruction will take several cycles to execute.
Gary, You can put both in your code and compare them in the list file. That will give you the exact answer for the PIC.
Also, is it absolutely necessary to divide by 126? It would be much faster to divide by 128, which boils down to a rotate and an AND.
|