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-Thread: a07f3367d7,3737542e2ed2b8e1 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 28 Apr 2009 21:46:23 +0200 From: Gautier User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.18) Gecko/20081031 SeaMonkey/1.1.13 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Problem with optimizations References: <49f73730$0$2850$ba620e4c@news.skynet.be> In-Reply-To: <49f73730$0$2850$ba620e4c@news.skynet.be> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 85.3.116.45 X-Original-NNTP-Posting-Host: 85.3.116.45 Message-ID: <49f75d09$1_5@news.bluewin.ch> X-Trace: news.bluewin.ch 1240947977 85.3.116.45 (28 Apr 2009 21:46:17 +0200) Organization: Bluewin AG Complaints-To: abuse@bluewin.ch X-Original-NNTP-Posting-Host: 127.0.0.1 Path: g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!130.59.10.21.MISMATCH!kanaga.switch.ch!news-zh.switch.ch!switch.ch!news.ip-plus.net!newsfeed.ip-plus.net!news.bluewin.ch!not-for-mail Xref: g2news2.google.com comp.lang.ada:5595 Date: 2009-04-28T21:46:23+02:00 List-Id: For your short-cut version of Is_Solved you might want to write: for i in Face_Index_T'range loop for c in Column_T loop for r in Row_T loop if Cube(i)(c,r) /= Final_Position(i)(c,r) then return False; end if; ... Just nicer looking, probably as fast as the "unrolled" version you have. Anyway, I strongly recommend adding -funroll-loops along with your -O2 switch. Also -fpeel-loops, -ftracer, -funswitch-loops might help. _________________________________________________________ Gautier's Ada programming -- http://sf.net/users/gdemont/ NB: For a direct answer, e-mail address on the Web site!