This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Optimization Advice for beginer?
- From: Barry Andrews <titanandrews at earthlink dot net>
- To: gcc-help at gcc dot gnu dot org, wodderwing1 <cebert at umich dot edu>
- Date: Tue, 7 Feb 2006 22:38:33 -0500
- Subject: Re: Optimization Advice for beginer?
- References: <2774684.post@talk.nabble.com>
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.