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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7844279822ce7c28 X-Google-Attributes: gid103376,public From: Jos De Laender Subject: Re: Newbie question : types , representation Date: 1999/08/24 Message-ID: <37C2E8BE.40461448@village.uunet.be>#1/1 X-Deja-AN: 516685724 Content-Transfer-Encoding: 7bit References: <37BFC251.601ADF8F@village.uunet.be> <7ppdon$j3p$1@nnrp1.deja.com> <7ptsgn$nvp$1@nnrp1.deja.com> <37c2d548@news1.us.ibm.net> Organization: UUNET Benelux (post does not reflect views of UUNET Benelux) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-08-24T00:00:00+00:00 List-Id: Matthew Heaney wrote: > > In article <7ptsgn$nvp$1@nnrp1.deja.com> , jdla@my-deja.com wrote: > > > But I didn't see however too much of practical answers how to do, in a ADA way > > and without spoiling to much processor cycles in converting hence and back. > > What makes you think that the "Ada way" is more expensive wrt processor > cycles? How do you know that Ada isn't faster than C? I didn't claim that ! I'm not starting one of those stupid 'this language is better wars'. I'm just asking how I can express the problem equally elegant/fast in ADA. What I do know that in C, I can do all of my operations (shifting, anding ..) on chars. It's ugly in the sense that I'm mixing really semantics of chars and bytes and integers and whatever. But on compiler output I can expect a fairly optimal implementation. In ADA , I think (but this was part of the question) , I have to go through some tables and through some conversion functions. Although it is not necessarily so , there is at least the increased risk of less optimal implementation, because the compiler has to find out those things. I didn't say this is not possible, I asked how one could write it without having this risk. Best regards, Jos De Laender