www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/20/11:42:51

Date: Wed, 20 Oct 1999 14:02:51 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Hammy <darren AT grayce DOT freeserve DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Mouse Events Problem
In-Reply-To: <7uitf2$qor$1@news8.svr.pol.co.uk>
Message-ID: <Pine.SUN.3.91.991020140024.22660b-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 20 Oct 1999, Hammy wrote:

>     I have this structure as a linked list and have ordered it in
> active/disable, now, i can image this being rather slow the more events i
> have.

How many events could there be?  For small amounts, linear search is just 
fine.

Anyway, you should never try to optimize the code before you wrote it.  
Once you get the program working, if it runs too slow, profile it and see 
where it spends most of the time.  More often than not, you will be 
surprised by what the profiler shows.  Which means that optimizing early 
generally means you optimize in the wrong place.

- Raw text -


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