delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/28/09:15:25

From: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
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
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 |
+----------------+

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019