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: ohk@fandango2-ether.tfdt-o.nta.no (Ole-Hjalmar Kristensen FOU.TD/DELAB) Subject: Re: CRC in Ada? Date: 1997/03/12 Message-ID: #1/1 X-Deja-AN: 224869628 References: <1997Mar2.220652@nova.wright.edu> Organization: Telenor Online Public Access Newsgroups: comp.lang.ada Date: 1997-03-12T00:00:00+00:00 List-Id: In article dewar@merv.cs.nyu.edu (Robert Dewar) writes: Jim Balter said <> But Jim Balter also said the following: Robert Dewar wrote: > > Jim Balter quoted me and replied > > < interpretation show a total *lack* of experience. If the tests are > coded properly so that the buffer accesses aren't optimized out of > existence, you will see about a 3:1 difference in user cpu time between > the getchar version and the read version, solely as a consequence of the > getchar macro requiring more instructions. Exactly the same number of > system calls are made, as anyone who attempts to *understand* the > issue instead of indulging in silly sophistry will know. If you then > do, say, 20 instructions worth of processing per character, the ratio > is 23:21. *Big* difference, like you'd expect. Feh.>> > > Well if there is one thing I am certainly not guilty of, it is lack of > experience :-) > > But actually Jim, you have your quotes confused. I never said there > were a different number of systems calls, of course not! I said exactly > the opposite. "You cannot make such statements (the standard IO lbrary of C definitely does IO in blocks). The standard speaks only of interfaces, not of implementation, there is nothing in the standardized interface that requires IO to be done in blocks. This may be an implementation characterstic of some or even most or even all current implementations, but it is NOT a fundamental property of the standard IO library. " Just so this is crystal clear at this stage, at least to other readers than Jim, I definitely did NOT imply that there are multiple system calls. It maybe that Jim does not know Ada 95 very well, and that is how he got confused. And the above quote from Jim Balter makes it crystal clear that we were talking about the C standard IO library, not Ada 95. It seems that you are deliberately trying to confuse things here. What I did say was that if you use String'Output and String'Input, the RM strongly implies character by character reads, since stream I/O is defined as being component wise. But of course this does not result in a system call per character, at least not in a reasonable implementation. For example in GNAT, this translates eventually into a normal C stream operation, which will typically be buffered. Yes, you did say that, but that has nothing to do with the post you replied to.