Date: Wed, 20 Oct 1999 14:02:51 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Hammy cc: djgpp AT delorie DOT com Subject: Re: Mouse Events Problem In-Reply-To: <7uitf2$qor$1@news8.svr.pol.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.