Message-ID: <5BF60CD649EDD411A04600B0D049F53AFFA93B@hydmail02.hyd.wilco-int.com> From: Prashant Ramachandra To: "'djgpp AT delorie DOT com'" Subject: RE: Cpu speed detection using DJGPP? Date: Wed, 25 Jul 2001 15:03:30 +0530 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain Reply-To: djgpp AT delorie DOT com On Wednesday, July 25, 2001 1:17 PM, kallekula60 AT hotmail DOT com [SMTP:kallekula60 AT hotmail DOT com] wrote: > Thanks for all the replies! This is what I came up with and it > seems > too work fine on my K6-2 computers. Blind interation loops might be optimized by some CPUs, so in effect it won't execute those 10000 times. So, it's better that you do something like: movl $1, %eax; xorl %eax, %eax; xorl %eax, %eax; xorl %eax, %eax; xorl %eax, %eax; xorl %eax, %eax; xorl %eax, %eax; ....// Around 500-1000 lines of this. and run the loop a few times. That produces reliable results according to some of the tests I've done on different CPUs. -- Prashant TR Web: http://www.midpec.com/ "Those who do not understand Unix are condemned to reinvent it, poorly." -- Henry Spencer