Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!ginosko!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!ucsfcgl!cca.ucsf.edu!root From: root@cca.ucsf.edu (Systems Staff) Newsgroups: comp.os.minix Subject: Re: Dhrystone 2.1 sample run Summary: Proposed Drhystone 2.1 changes Message-ID: <2499@ucsfcca.ucsf.edu> Date: 14 Oct 89 01:46:53 GMT References: <24988@louie.udel.EDU> <2457@ucsfcca.ucsf.edu> <3545@ast.cs.vu.nl> <1377@majestix.ida.liu.se> Organization: Computer Center, UCSF Lines: 61 In article <1377@majestix.ida.liu.se>, mwe@majestix.ida.liu.se (Mikael Wedlin) writes: > In article <2482@ucsfcca.ucsf.edu> root@cca.ucsf.edu (Systems Staff) writes: > >> > >> However, I consider it extremely poor human engineering to print out > >> a ton of lines that are the same (pairwise), apparently with the > >> idea that the user is to compare them. Why can't the computer do that? For the computer to do that would require writing the data produced to a file then processing the file to determine its correctness. Remember compiler analysis of the program must not be able to decide that any of its timed computations are redundant. Now we would have portability problems (Dhrystone is not just for Unix systems) so there would be twiddling to define the file to be used etc. Then we would have to read the file back in to check it (complicating the program and raising I/O compatibility issues). It wouldn't avoid these problems to create a separate program to do the checking and we can't depend on the presence of such utilities as "diff" which is absent from many systems. > >Under no circumstances make such deletions! > > > How about 'noice = fopen("/dev/null", "w");' ? > /Mikael A change that keeps it neat is to change the printf('s that produce the desired results to fprintf(stderr,'s then you can redirect stdout to /dev/null (on systems that support this) _after_you_have_verified_ the_test_output_. Doing it this way rather than the other way around is again for portability to shells that don't allow independent redirection of stderr. And, of course, you can just follow my previous suggestion and select the output with tail, e.g. echo 10000 | dry2 | tail -3 without changing the program at all. The obvious one line script echo $1 | dry2 | tail -3 makes it straightforward to use. But you must still check the verification output the first time after recompiling. The other problem is that Dhrystone 2.1 uses floating point to compute its results. I think this should be changed and am pursuing the point. Thos Sumner Internet: thos@cca.ucsf.edu (The I.G.) UUCP: ...ucbvax!ucsfcgl!cca.ucsf!thos BITNET: thos@ucsfcca U.S. Mail: Thos Sumner, Computer Center, Rm U-76, UCSF San Francisco, CA 94143-0704 USA I hear nothing in life is certain but death and taxes -- and they're working on death. #include