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 Path: g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!feeder.news-service.com!news2.euro.net!82.197.223.108.MISMATCH!feeder8.cambrium.nl!feed.tweaknews.nl!195.238.0.231.MISMATCH!news.skynet.be!195.238.0.222.MISMATCH!newsspl501.isp.belgacom.be!tjb!not-for-mail Date: Tue, 28 Apr 2009 19:54:28 +0200 From: Olivier Scalbert User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Problem with optimizations References: <49f73730$0$2850$ba620e4c@news.skynet.be> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <49f742d0$0$2851$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: dd40dffe.news.skynet.be X-Trace: 1240941264 news.skynet.be 2851 87.65.130.237:41558 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news2.google.com comp.lang.ada:5580 Date: 2009-04-28T19:54:28+02:00 List-Id: Albrecht K�fer wrote: > Works fine on Windows (GNAT GPL 2009). > However, I can't help but notice that you are doing premature > optimization. Did you *test* if it is faster? > > > Albrecht With -O3 also ? It is not premature optimization. The difference between Is_Solved and Is_Solved1 is quite important on my system: with -O2 and Is_solved: time ./rubikmain real 0m2.164s user 0m2.160s sys 0m0.000s with -O2 and Is_solved: time ./rubikmain real 0m3.604s user 0m3.596s sys 0m0.000s Olivier