[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [computer-go] Pattern Matcher
the program is really programmed by someone who has had a BASIC course only.
It has 2 pointers which both get used as an array.
He hasn't figured out what are expensive instructions on a processor and
which are slow.
Example the hashtable you can speedup eyes closed by setting the hashtable
by a multiple of 2 and then using AND.
Does JAVA have that instruction too?
The program is using dead simplistic loops. No optimization has been tried
anywhere.
And it compiles without optimizations.
I just will quote the makefile here :
# current options include TRANSIZE PROBES REPORTPLY
# suggested values for benching are
# TRANSIZE: 1050011 or 6249979 (see c4.h for other possibilities)
# PROBES: 8
# REPORTPLY: 8
DEFINES = -DUNIX -DTRANSIZE=1050011 -DPROBES=8 -DREPORTPLY=8
FLAGS = -Ofast $(DEFINES)
FILES = Makefile input \
play.c c4.h c4.c trans.c time.c types.h
CC = cc $(FLAGS)
c4 : play.o c4.o trans.o time.o
$(CC) -o c4 play.o c4.o trans.o time.o
play.o : play.c c4.h types.h Makefile
$(CC) -c play.c
trans.o : trans.c c4.h c4.h types.h Makefile
$(CC) -c trans.c
c4.o : c4.c c4.h c4.h types.h Makefile
$(CC) -c c4.c
time.o : time.c types.h Makefile
$(CC) -c time.c
# use the following for optimization levels that preclude separate compilation
together : play.c c4.h c4.h c4.c trans.c time.c types.h Makefile
$(CC) -o c4 play.c c4.c trans.c time.c
MANIFEST : $(FILES)
ls -l $(FILES) > MANIFEST
shar : $(FILES) MANIFEST
shar -o c4.shar MANIFEST $(FILES)
tar : $(FILES) MANIFEST
tar -cf c4.tar MANIFEST $(FILES)
gzip c4.tar
Is that how you compiled CILKCHESS too?
Also note that gcc is very fucking dead slow.
At 20:20 8-11-2004 -0500, Don Dailey wrote:
>
>> Can you give some example code Mark?
>
>Vincent,
>
>Go to John Tromps web site and download 2 program, one in C and the
>other in Java. They do exactly the same thing, they are connect-4
>solvers and do alpha/beta searching. You can time them both.
>
>Here is the web site:
>
> http://homepages.cwi.nl/~tromp/c4/fhour.html
>
>If you think something is wrong, the source code is there. Optimize
>the C code if you want and see if you can beat it. It is well
>written.
>
>I had this same argument a few weeks ago and I said Java was slow. I
>didn't argue for long, I tried it for myself and had to retract my
>opinion.
>
>
>- Don
>_______________________________________________
>computer-go mailing list
>computer-go@xxxxxxxxxxxxxxxxx
>http://www.computer-go.org/mailman/listinfo/computer-go/
>
>
_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://www.computer-go.org/mailman/listinfo/computer-go/