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: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: CRC in Ada? Date: 1997/03/05 Message-ID: <1997Mar5.083233.1@eisner>#1/1 X-Deja-AN: 223262538 X-Nntp-Posting-Host: eisner.decus.org References: <1997Mar2.220652@nova.wright.edu> <331bf6ce.2832564@news.logica.co.uk> <331d3cf9.1190126@news.logica.co.uk> X-Nntp-Posting-User: KILGALLEN X-Trace: 857568761/17577 Organization: LJK Software Newsgroups: comp.lang.ada Date: 1997-03-05T00:00:00+00:00 List-Id: In article <331d3cf9.1190126@news.logica.co.uk>, garriga@logica.com (Stephen Garriga) writes: > I was using a DEC Alpha, DEC Ada (83) and OS/F 3.2c! > I didn't the time to investigate too closely, but it looked to me > that, in my case, the I/O was actually implemented as many layers of > generics on top of the low level OS call then specific instantiations. > This remained in place at run time so instead of generating a single > stack frame/procedure call, dozens were done per read! > Efficiency was weighted over design purity and several such problems > were addressed with small C procedures interfaced to our Ada. If I were looking for maximum speed in Assembly Language, I would minimize the total number of reads done, to a single read if possible. This should be true for any language. On VMS, the fact that C programs imported from Unix tend to do a lot of single character I/O has forced the DEC C team to build in many little tricks to support an inherently inefficient programming technique. For Ada, I would guess that implementors have not counted on people using C-like programming constructs (vs. doing large buffer reads as suggested earlier in this thread). It is certainly possible to build an Ada environment optimized for single-character reads, but that would not seem to be a priority for most Ada compiler customers. Larry Kilgallen