This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
int vs. float divide optimization on AXP EV45
- To: egcs Mailing List <egcs at cygnus dot com>
- Subject: int vs. float divide optimization on AXP EV45
- From: "B. James Phillippe" <bryan at terran dot org>
- Date: Thu, 19 Nov 1998 11:55:43 -0800 (PST)
- Organization: terran.org/darkforest.org
Hello,
This is just a question I have out of curiousity. I read in a
paper by David Mosberger that the Alpha CPU lacks an integer divide
instruction. In the same paper, he proposed that it would actually be
faster to do division with floating point types on the Alpha than with
integers.
I ran an expirament to test this statement with egcs-2.91.56 (and
the optimizer off), and sure enough, he is correct. I see a noticeable
performance advantage on my EV45 (21064A) box when using a double for
division over an int. However, and here is where my question lies, when I
turn the optimizer on, the integer divide becomes much faster than the
floating divide.
I would like to understand a little about how the egcs optimizer
accomplishes this. I have compiled with the Haifa scheduler enabled, if
that makes a difference. Mostly, I'd like to know if there are other
old-fashioned Alpha hand-optimizations that egcs can obsolete. :)
thanks,
-bp
--
B. James Phillippe . bryan@terran.org
UNIX Software Engineer . http://www.terran.org/~bryan
Member since 1.1.59 . finger:bryan@earth.terran.org
MOTM: Waiting for the DSL to go in :/