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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Linear Search Date: Wed, 28 Sep 2016 16:08:29 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Wed, 28 Sep 2016 23:08:21 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="6df4b173985f7c5c043cea362c370ff7"; logging-data="692"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ZyXMcZHXlJADo2KUU5tlR+8FD7cvWdYI=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 In-Reply-To: Cancel-Lock: sha1:mfMSbUADRbQkdoc8Bh2WOWDFtx4= Xref: news.eternal-september.org comp.lang.ada:31936 Date: 2016-09-28T16:08:29-07:00 List-Id: On 09/28/2016 01:21 PM, Randy Brukardt wrote: > > Or, say compiling Ada and the search is in generated parse tables. (I was > able to speed up the parsing speed of our compiler by an order of magitude > by replacing the linear search for the next symbol by a tuned search.) Sure, I've done that, too. And when I did it, the time difference made the program significantly more responsive to users. But I was never searching anything close to 7M items. If I had written the same program today, with the same linear search, it seems likely that it would have been fast enough, and I'd never have needed to change it. -- Jeff Carter "Perfidious English mouse-dropping hoarders." Monty Python & the Holy Grail 10