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,9c86eb13dd395066 X-Google-Attributes: gid103376,public From: garriga@logica.com (Stephen Garriga) Subject: Re: CRC in Ada? Date: 1997/03/05 Message-ID: <331d39a7.340289@news.logica.co.uk>#1/1 X-Deja-AN: 223228747 References: <1997Mar2.220652@nova.wright.edu> <331bf6ce.2832564@news.logica.co.uk> Organization: Logica UK Ltd Newsgroups: comp.lang.ada Date: 1997-03-05T00:00:00+00:00 List-Id: On 4 Mar 1997 16:01:48 -0500, dewar@merv.cs.nyu.edu (Robert Dewar) wrote: {quote snip} > >Well of course no one can see what the two pieces of code you compared >are, since you did not post them, so we cannot tell whether the problem >came from inappropriate coding choices on your part, or bad code generation >in the Ada compiler you were using -- it certainly was nothing to do with >C vs Ada per se as languages. My comment was just a warning! I was not saying C was a better language, merely that in certain situations one has to be pragmatic. On certain platforms, certain operations are fast in C and dogs in Ada. > >In any case, using any decent Ada 95 compiler, this should not be an issue, This assumes you can use Ada95 or have compiler choice. In the UK at least, our customers are still insisting on Ada(83) or specific vendor implementations. >if you code using the same approach and general abstraction level in the >C code and in the Ada code. Indeed, the availability of packed arrays in >Ada (but not in C) may allow you to raise the semantic level of the Ada >code without penalty (but this is not necessarily the case,, just a >possibility). > FYI the specific problem I encountered was generating a CRC for a file. The performance problem was entirely due to poor performance by the Ada I/O routines. (There were other problems like failure to identify end of file situations too). DEC Ada & OS/F 3.2c Steve Garriga garriga@logica.com type OPINION is access PERSONAL_THOUGHTS_AND_BIAS; OPINION_STATED : new OPINION := not LOGICA.OPINION; Logica UK Ltd. +44 171 637 9111 http://www.logica.com