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,1d575f572a099528 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-01 07:48:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!ppp-1-127.cvx5.telinco.NET!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: What is faster Ada or C? Date: Sat, 1 Dec 2001 03:44:55 -0000 Message-ID: <9uau3a$79113$1@ID-25716.news.dfncis.de> References: <3c08314d$0$158$9b622d9e@news.freenet.de> NNTP-Posting-Host: ppp-1-127.cvx5.telinco.net (212.1.152.127) X-Trace: fu-berlin.de 1007221678 7636003 212.1.152.127 (16 [25716]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:17276 Date: 2001-12-01T03:44:55+00:00 List-Id: "Heiko Hamann" wrote in message news:3c08314d$0$158$9b622d9e@news.freenet.de... > I have a program written in Ada that is very processor intensiv. It does bit > and integer operations. What would you guess is the faster languages for > this task? Ada or C - or another language (excpet Assembler)? What might be a practical approach to getting more speed would be to use assembly for the critical bits, and a higher level language for the rest. I guess you've considered this (?). It's possible that, in practice, a Fortran compiler might get you a touch more speed, but this is a guess. I'd say the difference is not likely to be great between any of those languages whose compilers are intended to be 'true' native code compilers, and that the most difference in speed will be due to differences in actual compilers. Which Ada compiler do you use (and what is the target machine)? Have you tried turning off checks (using the Suppress pragma)? I'd be interested to know if that made any difference! > Can that be said in common? The saying is "horses for courses". You use a particular language for a variety of reasons, rather than just speed. If you need raw speed above all, you probably need to use assembly. > What is about some benchmarks concerning this case? Others might have some data on this. -- Best wishes, Nick Roberts