From: Vik Heyndrickx Newsgroups: comp.os.msdos.djgpp Subject: Re: need help turning integer->FPU code Date: Mon, 27 Oct 1997 09:28:24 +0100 Organization: University of Ghent, Belgium Lines: 22 Message-ID: <345450A8.6E32@rug.ac.be> References: <62njvj$718$1 AT hecate DOT umd DOT edu> NNTP-Posting-Host: eduserv1.rug.ac.be Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Jason Stratos Papadopoulos wrote: > > It runs in approximately 46 cycles on a Pentium, and I'd like to cut > the time down (or even better, use those nice 80 bit FPU registers to > do the whole thing in 10 cycles). Any ideas? Write your code in C(++), compile it with -O2 -S switches, then you get the assembly version of your code already very optimized in file with extension '.S'. Maybe you can tweak out some more cycles by hand. Use that code as inline assembly. BTW: did you know that converting 'long unsigned' to a FPN goes much less efficient than converting from a 'signed long'. > Thanks, Hope this helps. -- +----------------+ | Vik Heyndrickx | +----------------+