delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/07/10:07:01

Date: Thu, 7 May 1998 17:04:24 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Johan Van Ooijen <j DOT w DOT vanooijen AT cpro DOT dlo DOT nl>
cc: djgpp AT delorie DOT com
Subject: Re: large variation in run-time
In-Reply-To: <PSxEvgVLkg3c@ns2>
Message-ID: <Pine.SUN.3.91.980507170149.6703F-100000@is>
MIME-Version: 1.0

On Thu, 7 May 1998, Johan Van Ooijen wrote:

> >Another possibility might be the size of your innermost loop: if it
> >sometimes overflows the CPU caches, you will see a factor of 2-4 in
> >performance without any apparent explanation.
> 
> How does this happen?

If your inner loop has conditionals (if (foo) etc.) which only sometimes 
fire, then the size of the code executed on each iteration will vary.  If 
that size becomes more than the CPU cache, runtime will suffer.

- Raw text -


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