From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <25d1dbde618c88a762da80fca8de9844.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199712041156.MAA05264@pcronny.axis.se> Date: Thu, 04 Dec 1997 07:18:18 -0500 From: Uncle George Subject: Re: BYTEmark benchmark u gonna let byte know? gee a whole new set of tests Volker Barthelmann wrote: > On Fri, 28 Nov 1997, Ronny Ranerup wrote: > > > Has anyone managed to compile and run the Byte Unix Benchmarks? > > Yes. > > > There is a Linux version available at http://math.vanderbilt.edu/~mayer/linux/bmark.html > > but I cannot get it to run all the way through. I get a floating point error > > after a while. > > Look at the following code from the beginning of DoHuffIteration in > nbench1.c: > > /* > ** Calculate the frequency of each byte value. Store the > ** results in what will become the "leaves" of the > ** Huffman tree. Interior nodes will be built in those > ** nodes greater than node #255. > */ > for(i=0;i<256;i++) > { > hufftree[i].freq=(float)0.0; > hufftree[i].c=(unsigned char)i; > } > > for(j=0;j hufftree[plaintext[j]].freq+=(float)1.0; > > for(i=0;i<256;i++) > if(hufftree[i].freq != (float)0.0) > hufftree[i].freq/=(float)arraysize; > > /* > ** Build the huffman tree. First clear all the parent > ** pointers and left/right pointers. Also, discard all > ** nodes that have a frequency of true 0. > */ > for(i=0;i<512;i++) > { if(hufftree[i].freq==(float)0.0) > hufftree[i].parent=EXCLUDED; > else > hufftree[i].parent=hufftree[i].left=hufftree[i].right=-1; > } > > Only the first 256 entries are set to 0.0, but the first 512 entries are > tested. Replacing the 256 in the first loop by 512 should fix that > problem. > > As the uninitialized values are not only read and ignored but even affect > further calculations the results probably can't be trusted - even on > systems that don't trap reading of uninitialized data. > > Comparing the results on Linux with the results on NT or DU with DEC's > compilers yields much worse floating-point-performance - at least for > bytemarks. > > Volker > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com