Author: Sune Fischer
Date: 04:15:54 04/23/02
Go up one level in this thread
On April 23, 2002 at 05:46:54, Uri Blass wrote: >In my program I thought about optimization in cases that it is important but >only about changing the algorithm and I decided to do nothing about optimization >of writing the same algorithm faster by assembler that I do not know. > > >>Things like generating the entire movelist and then sorting the entire movelist >>by some simple O(N^2) algorithm, and doing all this with a huge array being >>allocated on the fly is real bad, it will cost a lot of performance. >> >>That was my first design, I rewrote it but I didn't find it trivial to do. >>I simply had to change it, I couldn't stand looking at what I knew was p*ss poor >>code. > >It is not clear if doing it in O(N*logN) is better because often the first move >fail high and you can do it in O(N). I was doing this: GenAllMoves(); SortAllMoves(); while(moves left){ MakeMove(); search.... } ...simple but slow. >>Knowing that what you write will be fast and efficient, is part of the fun IMO. >> >>I also think a lot of professional programmers do not spend enough time >>optimizing for speed. They are too busy implementing a lot of fancy features, >>the end result is are programs that can do a lot, but will do it slowly and use >>a ton of memory. That means we all have to upgrade our hardware, which means the >>programmers can become even more sloppy with their code etc... >> >>They all wait with the speed optimization till their program is done, but when >>is a program done? It never is, suddenly its time to release the program and >>they spend the last critical hours franticly debugging.. >> >>Am I right? ;) >> >>-S. > >Speed optimization is important if you expect a factor of 10 but I do not think >that professional programmers expect this factor >by optimization of their program. > I just think the priorities on fast development and robust and "clean" codes are higher. If the program takes 1 sec or 2 sec to do a job doesn't matter to them, however it effectively reduces a 2 GHz machine to a 1 GHz machine. >I am sure that they spend time about optimization in cases that they can get a >big improvement. > >I also did it and before having a chess program I improved the speed of my move >generator by a factor of about 100(I am not sure about the exact number but my >first move generator was very slow). > >Uri Yes, of cause it is not worth getting into all those optimizations until you have decided on the design. -S.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.