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: 224870078 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 <33263B09.6285@netcom.com> Jim Balter writes: Robert Dewar wrote: > I am not quite sure what you mean by the measurements being misleading, > they are measuring exactly what they purport to be measuring. It is > possible to draw incorrect conclusions from these measurements, but > they only mislead those who wish to be mislead! Robert Dewar is apparently so afraid of seeing certain inputs that he has blocked mail from me. This immediately after misreading a note from me pointing out that he had taken Ole-Hjalmar Kristensen's measurements as valid because they showed what he wanted them to show (even though important code in an inner loop may have been optimized out) as instead claiming that *he*, Dewar, had taken the measurements, and thereupon interpreting me as being unable to follow a newsgroup thread. Of course, I made no such mistake as thinking that Dewar had taken the measurement. -- Actually, I don't think he claimed to have done the measurements himself. But just some comments about doing invalid measurements and being unable to interpret the results :-) I did the measurements mainly to show that the amount of work being done by system calls was exactly the same in both cases, and that is why the setvbuf call was made to ensure that the buffer size was the same in both cases. I didn't particulary care about the code in the inner loop being optimized away, because as you have said yourself, as soon as you start doing something interesting with the char, the difference is pretty unimportant. I only expressed a mild surprise that not more of the getchar macro had been optimzed away as well. Btw., I've re-run the program with a simple checksum computation in the innner loop, and the ratio is now 4 to 1. Still a bit more difference than I would have thought, but pipelining effects may have something to do with it, as Dewar pointed out.