From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31570 invoked by alias); 8 Feb 2006 03:38:38 -0000 Received: (qmail 31559 invoked by uid 22791); 8 Feb 2006 03:38:38 -0000 X-Spam-Check-By: sourceware.org Received: from smtpauth04.mail.atl.earthlink.net (HELO smtpauth04.mail.atl.earthlink.net) (209.86.89.64) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Feb 2006 03:38:37 +0000 Received: from [69.69.179.229] (helo=[192.168.2.100]) by smtpauth04.mail.atl.earthlink.net with asmtp (TLSv1:RC4-MD5:128) (Exim 4.34) id 1F6gA6-0000iM-Pe; Tue, 07 Feb 2006 22:38:35 -0500 From: Barry Andrews To: gcc-help@gcc.gnu.org, wodderwing1 Subject: Re: Optimization Advice for beginer? Date: Wed, 08 Feb 2006 03:38:00 -0000 User-Agent: KMail/1.6.1 References: <2774684.post@talk.nabble.com> In-Reply-To: <2774684.post@talk.nabble.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200602072238.33312.titanandrews@earthlink.net> X-ELNK-Trace: 6d978e923c809eca230ea5175cdd9f814d2b10475b571120c984848f3f8da52c9b62f01e97bff26bdaeb3e8d137e934c350badd9bab72f9c350badd9bab72f9c X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg00069.txt.bz2 Well... I find it interesting that you are relying on the compiler to optimize. Usually the first place to look at is your code. But anyway... looking at your compiler options, I think you have pretty much done everything you can. Maybe optimizing for a particular processor is an option for you? -Barry On Sunday 05 February 2006 08:29 pm, wodderwing1 (sent by Nabble.com) wrote: > I am in a second level college programing class, and we have to make a maze > solving program, and we are graded on how much time out program uses to > produce a optimal solution. I have done just about everything I can to > optimize my code, my program takes 0.055 seconds to complete all of the > test cases, but I need to run a little faster. > > I was wondering if you know any good optimization flags that I can use > that would increase perfomance. I am using stack and queue data strutures. > Also, I do not know what type of machine, or "Autograder" will compile and > grade my code, but I am allowed to submit my own makefile. > > Here is my current make file: > > " > > > .SUFFIXES: .o .cpp > > OBJS = prog.o maize.o > #CC = g++ -Wall > #CC = g++ -g -Wall > CC = g++ -O3 -Wall -O -funroll-loops > AR = ar cr > > all : $(OBJS) UTIL/libutil.a > $(CC) -o MortimerMaze $(OBJS) UTIL/libutil.a > > UTIL/libutil.a: > cd $(PWD)/UTIL; make PWD=$(PWD)/UTIL > > clean: > rm -rf *.o MortimerMaze > cd $(PWD)/UTIL; make PWD=$(PWD)/UTIL clean > > .cpp.o: > $(CC) -c $*.cpp > > > " > > -- > View this message in context: > http://www.nabble.com/Optimization-Advice-for-beginer--t1066651.html#a27746 >84 Sent from the gcc - Help forum at Nabble.com.