Path: csiph.com!news.mixmin.net!aioe.org!peer01.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Hans-Peter Diettrich Newsgroups: comp.compilers Subject: Re: Algorithm Optimization Date: Thu, 17 Sep 2020 06:35:47 +0200 Organization: Compilers Central Lines: 16 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <20-09-042@comp.compilers> References: <20-09-032@comp.compilers> <20-09-035@comp.compilers> <20-09-036@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="52498"; mail-complaints-to="abuse@iecc.com" Keywords: optimize Posted-Date: 19 Sep 2020 21:05:56 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com X-Received-Bytes: 1753 X-Received-Body-CRC: 757270344 Xref: csiph.com comp.compilers:2613 Am 16.09.2020 um 07:25 schrieb gah4: > One thought was that someone codes bubblesort, and the compiler > generates quicksort. Small complication that bubblesort is stable, and > quicksort isn't. (Add an array with the original position to break > ties.) Right, algorithm or control flow optimization should be located in an earlier project stage, not in compilation. It also smells like the dream of automated "proof of correctness", whose basics I learned 50 years ago but never found usable results yet. How shall a tool suggest other algorithm(s) without knowing (having determined - how?!) about the goals of a piece of code? DoDi