Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!njin!princeton!notecnirp!nfs From: nfs@notecnirp.Princeton.EDU (Norbert Schlenker) Newsgroups: comp.os.minix Subject: Dhrystone Message-ID: <19859@princeton.Princeton.EDU> Date: 4 Oct 89 14:31:14 GMT References: <3461@ast.cs.vu.nl> Sender: news@princeton.Princeton.EDU Reply-To: nfs@notecnirp.UUCP (Norbert Schlenker) Organization: Dept. of Computer Science, Princeton University Lines: 57 In article <3461@ast.cs.vu.nl> ast@cs.vu.nl (Andy Tanenbaum) writes: >... >While I was at it, I ran dhrystone. I'll post my version in the next message. >I think it might be interesting if the compatibility list had a column for >dhrystone. Does that sound like a good idea (Alan)? > >Results of my tests: > >Machine Vers. OK? Who? Date Dhry. >Zenith Z248 1.4a Y ast@cs.vu.nl 02 Oct 89 1086 >Tandon 386/16 1.4a Y ast@cs.vu.nl 02 Oct 89 1851 >Wyse 386/16 1.4a Y ast@cs.vu.nl 02 Oct 89 2173 >Epson AX3 1.4a Y ast@cs.vu.nl 02 Oct 89 2500 HD failed >Laser 386/20 1.4a Y ast@cs.vu.nl 02 Oct 89 3125 >Tulip 386/25 1.4a Y ast@cs.vu.nl 02 Oct 89 3846 >Laser 386/25 1.4a Y ast@cs.vu.nl 02 Oct 89 4166 >Commodore PC-60 1.4a Y ast@cs.vu.nl 02 Oct 89 4545 >... >Andy Tanenbaum (ast@cs.vu.nl) Here are my results on a Toshiba 5100, a portable with a 16MHz 80386. I am running Minix 1.4a with Bruce Evans' protected mode. ACK 1.3 ACK 1.3 Microsoft C 5.1 Test Spencer Mine MS/DOS 3.3 ------ ------- ------- --------------- ~R/~SA 2100 2531 3300 ~R/ SA 2657 3397 4160 R/~SA 2091 2514 2860 R/ SA 2647 3382 3570 4760 (maximum optimization) Notes: "Spencer" is the 1.3 library with Henry Spencer's string routines "Mine" is a library with recoded string routines R means register variables are defined, ~R not. SA means structure assignment was used, ~SA not. Lessons to learn: 1. Let your compiler do the work! Notice how the definition of register variables helps not at all (and see how it hurts MSC). 2. Let your compiler do the work! Notice the speedup when you let the compiler move structures around. 3. Find your bottlenecks and recode them. I use a lot of code that shoves strings and/or memory around. The performance penalty (compared to MS/DOS) was just too large when using the standard library, so I recoded the routines. There is still a penalty, but the difference (now 10-20% instead of 30-40%, depending on application) is small enough for me not to be concerned. 4. Bug your vendor (this means you, Andy!) to improve the compiler. Look at the difference between the upper left entry and the bottom right one - there is obviously big room for improvement. (To be fair, the real difference is between 2657 and 4760.) For me, the gap is between 3397 (ACK 1.3, my library) and 4760 (MSC 5.1, no fiddling required), which I consider rather large still (but not large enough to make me use DOS). Norbert