InvestorsHub Logo

upc

Followers 0
Posts 316
Boards Moderated 0
Alias Born 05/21/2004

upc

Re: None

Monday, 08/09/2004 2:29:23 PM

Monday, August 09, 2004 2:29:23 PM

Post# of 97586
Anand's TSCP makefile was broken:

D'oh! That reviewer should stick to running Doom3 timedemos.

http://www.aceshardware.com/forum?read=115093869

Ok, his Makefile is completely f*cked up...
By Foo_ on Monday, August 9, 2004 2:18 PM EDT

I have found why he has so terrible results. The Makefile he gives for TSCP does not optimize (-O2 flag) during the compile stage, only in the linking stage where it's useless.

See :

$ cat Makefile
SRC = main.c board.c book.c data.c eval.c search.c
BIN = tscp
OBJ = $(SRC:.c=.o)
CC = gcc
CFLAGS = -ansi -pedantic
OPTIMIZE = -O2

$(BIN):$(OBJ)
$(CC) $(CFLAGS) $(OPTIMIZE) $(OBJ) -o $(BIN)
%.o: %.c
$(CC) -c $< -o $@

.PHONY: clean lint
clean:
rm -f $(OBJ) $(BIN) *.core 2> /dev/null
lint:
lint $(SRC)


$ make
gcc -c main.c -o main.o
gcc -c board.c -o board.o
gcc -c book.c -o book.o
gcc -c data.c -o data.o
gcc -c eval.c -o eval.o
gcc -c search.c -o search.o
gcc -ansi -pedantic -O2 main.o board.o book.o data.o eval.o search.o -o tscp
$

With the broken Makefile I only get 140 k n/s, instead of 281 with the intended optimizations applied during the compile stage.


Volume:
Day Range:
Bid:
Ask:
Last Trade Time:
Total Trades:
  • 1D
  • 1M
  • 3M
  • 6M
  • 1Y
  • 5Y
Recent AMD News