From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bc61960915472029 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Wed, 30 Nov 2005 18:06:23 -0600 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: Subject: Re: Q re floating point operations Date: Wed, 30 Nov 2005 18:10:29 -0600 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4952.2800 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4952.2800 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-RuUu1QZmHPvBaCikd7ev9KKLvWsGPH7j4Qhku3OrepEFgRcwAVeqUO3UY3Dw93wPgQS/94XbV/SC9/1!s1QhjyB/LDRxdREtPgkSJxjQrij+D3oNB/PiZaj3hgNH0wC1uqB6cXzP7/+u2yha3js+KX8yOSRa!7UdY85QHY1NL2g== X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:6697 Date: 2005-11-30T18:10:29-06:00 List-Id: "Steve" wrote in message news:rcKdnaRpgeb3kO_enZ2dnUVZ_v-dnZ2d@comcast.com... > "Bobby D. Bryant" wrote in message > news:dkrjmn$peg$1@geraldo.cc.utexas.edu... > > How come on an x86 architecture 64-bit multiplications (GNAT > > Long_Float) are just as fast as 32-bit multiplications (GNAT Float)? > > This is an x86 architecture question, not an Ada question. > > The speed difference on these multiplications went away several years ago. Yeah, in about 1981. :-) That is to say, there *never* has been a difference in multiply times on the 8087 architecture (now folded into the Pentium and later processors). I dragged out my July 1981 8086/8087 processor manual. (Very well used; much of the output of Janus/Ada was designed based on this book.) There is only one multiply instruction; it works on 80-bit registers, and the clock times depend only on the values being multiplied. It takes longer if the values have a lot of one bits, so I suppose values from 32-bit float might multiply faster than those from 64-bit long_float IFF the values are different -- but if the values are the same, the multiply time has always been the same. More modern versions multiply in constant time (not depending on the values); that goes back at least to the original Pentium (my book is dated 1993). The only possible difference is the memory access times for the operands (not strictly part of the multiply, but it might appear so). But those should be quite small on modern machines. Randy.