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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f73321fd39537dd2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-29 11:07:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed-east.nntpserver.com!nntpserver.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!59ce1190!not-for-mail Message-ID: <3CF518F8.AA7A49ED@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: 64 bit integers References: <3CF4F374.5010306@yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 29 May 2002 18:07:54 GMT NNTP-Posting-Host: 63.184.107.35 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1022695674 63.184.107.35 (Wed, 29 May 2002 11:07:54 PDT) NNTP-Posting-Date: Wed, 29 May 2002 11:07:54 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:24949 Date: 2002-05-29T18:07:54+00:00 List-Id: David Rasmussen wrote: > > Can I be reasonably sure that if I use some sort of 64-bit integer in > Ada, that it will be represented by native 64-bit registers on a 64-bit > machine, and perhaps even more important, that it will be represented by > some very effecient double 32-bit registers scheme on a 32-bit processor? Yes, you can be reasonably sure. If you need to be completely sure, then you need to evaluate the object code output by candidate compilers. > > For instance, with GNAT, will it be as fast to use Ada for this kind of > thing as it will be to use long long with GNU's C or C++ compiler? This depends a lot on what you want to do and what you mean by "be as fast". It will probably be faster to get to a correct program in Ada than in C/++, for example. If you're talking about the speed of the generated code for dealing with integers, it still depends. If you want overflow checking, for example, the Ada code will probably be faster than the C/++ code, since in C/++ you will have to manually include overflow checks, and they will always be executed. In Ada, the compiler automatically includes the checks, and can optimize them away when they are unnecessary. -- Jeff Carter "You couldn't catch clap in a brothel, silly English K...niggets." Monty Python & the Holy Grail