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/25 Message-ID: <37C39B30.CEBEE0B5@alcatel.be>#1/1 X-Deja-AN: 516921270 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> <37C2E8BE.40461448@village.uunet.be> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.bel.alcatel.be X-Trace: bt02e2.god.bel.alcatel.be 935565987 26719 138.203.96.205 (25 Aug 1999 07:26:27 GMT) Organization: Alcatel Mime-Version: 1.0 NNTP-Posting-Date: 25 Aug 1999 07:26:27 GMT Newsgroups: comp.lang.ada Date: 1999-08-25T07:26:27+00:00 List-Id: Thanks, this was really very to the point for what concerns my problem ! I learned from it. Some small comments furtheron between your text. Best regards, Jos Brian Rogoff wrote: > If you know that characters are the same size as your "byte" type, be it > an Interfaces.Unsigned_8 or a System.Storage_Element then it should be OK > to use Unchecked_Conversion if you're worried about the overhead of a > conversion function, but I really can't imagine any overhead even from a > safe type conversion if you turn checking off, which you really must do if > you want to compare with C. I don't understand why you think there is some > table lookup involved. I think here I was partly wrong. The table lookup is needed for the original algorithm where I got the problem (base64 decoding) , but it is equally needed in C as in ADA. So forget indeed this one ... > > > Part of the problem with C and Ada comparisons is that every C operation is > unchecked, whereas in Ada everything is checked by default. You have to > know enough about your Ada compiler to turn off those checks when doing > the performance comparisons. I realize this extremely well ! As I told you I do know VHDL quite well , and I have to use always this same explanation to explain the 'C is faster crowd' that when comparing the same functionality , including the checking , it isn't. > > > -- Brian Jos De Laender