Vadim
Fri Feb 25 07:40:02 CST 2005
Thank you very much. This link is interesting.
So I can write that algorithm on C. It should be as fast as it is on
assembler?
Actually I need accelerate program. Any tricky thing is helpful for me.
Why I asked about assembler acceleration first?
I've got this quest during some test. So if you can give something about
it...
--
Vadim S.
"Simon Trew" <noneofyour@business.guv> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:uyPcD7oGFHA.1176@TK2MSFTNGP12.phx.gbl...
> "Victor Bazarov" <v.Abazarov@comAcast.net> wrote in message
> news:OVeYexbGFHA.2976@TK2MSFTNGP09.phx.gbl...
> > Profile your program and find the performance bottlenecks before
> > attempting something as drastic as using inline assembly.
>
> And of course if it is a bottleneck then the best solution is likely to be
> an algorithm change-- e.g. squaring all the algorithm's inputs, doing all
> the calculations in the 'square' space, and then just taking the square
> roots of the result.
>
> Of course, one has then to make sure the algorithm is tolerably faithful
to
> the original.
>
> If the argument and results are of integer type, then one can use an
integer
> square root algoirthm. A good explanation of one such algorithm is found
> here:
http://ww1.microchip.com/downloads/en/AppNotes/91040a.pdf
>
>