Related articles |
---|
Re: algorithm performance robin51@dodo.com.au (Robin Vowels) (2018-03-27) |
From: | Andy Walker <anw@cuboid.co.uk> |
Newsgroups: | comp.compilers |
Date: | Fri, 23 Mar 2018 18:47:14 +0000 |
Organization: | Not very much |
References: | <6effed5e-6c90-f5f4-0c80-a03c61fd2127@gkc.org.uk> 18-03-042 18-03-047 18-03-075 18-03-077 18-03-090 |
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 |
Content-Language: | en-GB |
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]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.