Path: csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Andy Walker Newsgroups: comp.compilers Subject: Re: algorithm performance, was Add nested-function support in a language the based on a stack-machine Date: Fri, 23 Mar 2018 18:47:14 +0000 Organization: Not very much Lines: 32 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <18-03-092@comp.compilers> References: <6effed5e-6c90-f5f4-0c80-a03c61fd2127@gkc.org.uk> <18-03-042@comp.compilers> <18-03-047@comp.compilers> <18-03-075@comp.compilers> <18-03-077@comp.compilers> <18-03-090@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="47622"; mail-complaints-to="abuse@iecc.com" Keywords: performance, comment Posted-Date: 24 Mar 2018 09:34:02 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Content-Language: en-GB Xref: csiph.com comp.compilers:2023 On 23/03/18 10:44, Martin Ward wrote: [...] > which takes 100,000,000 seconds (over 1,000 years) Point of order: 100,000,000 seconds is about pi years. [...] > For a linear algorithm, say a linear search, my first computer > takes 0.001 seconds to process the data, while my new laptop > takes 0.1 seconds. So if I need to execute this linear algorithm > more than 10 times a second, my old computer will be fine > but my new laptop would struggle. On the other hand, if you needed to search, say, a million items, your new laptop would process them in around a millisecond, while your first computer would spend however long it took you to feed in the data bit-by-bit from a sequence of floppies. Several minutes? Somewhat more to the point, as this is "comp.compilers", it seems unlikely that either the compiler or the source being compiled have grown by anything like the growth in RAM, despite the unfortunate modern [ie last 40-odd years!] tendency towards bloat. It seems somewhat OTT to claim that we need better algorithms *because of* faster and logically-bigger computers. We want them primarily because they are better! -- Andy Walker, Nottingham. [Well, both. Some compiler optimization algorithms can be quite slow, ike optimal register assignment and constructing perfect hashes. -John]