delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/25/06:26:26

Message-ID: <5BF60CD649EDD411A04600B0D049F53AFFA93D@hydmail02.hyd.wilco-int.com>
From: Prashant Ramachandra <rprash AT wilco-int DOT com>
To: "'djgpp AT delorie DOT com'" <djgpp AT delorie DOT com>
Subject: RE: Cpu speed detection using DJGPP?
Date: Wed, 25 Jul 2001 15:50:16 +0530
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Reply-To: djgpp AT delorie DOT com

On Wednesday, July 25, 2001 3:04 PM, I wrote:
> 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.

Whoops, that should have been

divl %eax;...repetitive

That takes more CPU cycles.
--
Prashant TR <tr AT midpec DOT com>  Web: http://www.midpec.com/

"Those who do not understand Unix are condemned to reinvent it, poorly."
     -- Henry Spencer

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019