From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ad0779dc60e28dee X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-07 13:45:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.vmunix.org!newspeer1-gui.server.ntli.net!ntli.net!newsfep4-glfd.server.ntli.net.POSTED!53ab2750!not-for-mail From: "chris.danx" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Data Structure Choice for DOM References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 07 Mar 2003 21:46:05 +0000 NNTP-Posting-Host: 81.98.236.72 X-Complaints-To: abuse@ntlworld.com X-Trace: newsfep4-glfd.server.ntli.net 1047073556 81.98.236.72 (Fri, 07 Mar 2003 21:45:56 GMT) NNTP-Posting-Date: Fri, 07 Mar 2003 21:45:56 GMT Organization: ntl Cablemodem News Service Xref: archiver1.google.com comp.lang.ada:35054 Date: 2003-03-07T21:46:05+00:00 List-Id: Simon Wright wrote: > > Do it the way that gets you working code quickest, profile it (speed > and memory), and choose another implementation for this part if it's > justified. :) "Premature optimisation is the root of all evil" or something like that? Linked list is easiest & quickest. It'll be O(n) in worst case but it'll work. Later I'll change it to an AVL tree or something else. > Aside from anything else, this will be much more fun (cos the DOM > application you have in mind will be able to _do_ something!) True. I suppose I should have just did it, rather than search for the right data structure. That's one of my big problems, looking for the "best" solution to a problem rather than getting stuck in and improving the deficiencies later! Thanks, Chris