www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/02/16:52:36

To: djgpp AT delorie DOT com
Subject: Re: fixed point math: NEED HELP QUICK!
Message-ID: <19970202.133721.4351.3.chambersb@juno.com>
References: <Pine DOT LNX DOT 3 DOT 95 DOT 970201053600 DOT 140d-100000 AT capslock DOT com> <19970201 DOT 123135 DOT 4847 DOT 3 DOT chambersb AT juno DOT com>
<5d2as2$d48$1 AT troll DOT powertech DOT no>
From: chambersb AT juno DOT com (Benjamin D Chambers)
Date: Sun, 02 Feb 1997 16:36:02 EST

On Sun, 02 Feb 1997 08:44:50 GMT ovek AT arcticnet DOT no (Ove Kaaven) writes:
>chambersb AT juno DOT com (Benjamin D Chambers) wrote:
>

>Need help?
>After trying this out, I no longer have any doubt that gcc can make
>shifting faster than mul's, it will employ lea, sal, add, and sub in
>pretty ingenious ways (*never* resorts to mul). On my Pentium, I found
>that the multiplication with shift versions was almost double as fast
>on average as mul versions (at least the range I checked). Look at the
>generated mult.s and be impressed by gcc's optimization prowess. I
>don't have much time for further testing, so if you want to conduct
>more extensive tests, modify the generator and test code below as
>appropriate, provided you have enough RAM and stack (which I didn't
>for the entire 64K range). This also shows the power of preprocessors.
Well, what do you know???
That's almost exactly the method I was using (though it took me around 2
hours, got rather messier than this, and didn't seem to work right).

...Chambers

- Raw text -


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