Author: Robert Hyatt
Date: 06:42:51 11/13/97
Go up one level in this thread
On November 13, 1997 at 09:26:02, Marcel van Kervinck wrote: >On November 11, 1997 at 08:11:37, Jouni Uski wrote: >>Rebel, Genius and Fritz have written in assebler to get everything >>from prosessor speed. But why are Hiarcs (and possible Junior, >>Shredder etc.) better even if they are pure C programs? Is this >>handtuning totally waste of time or is Mark superior in comparison >>to assembler guys or what ? > >It is often argued that with current architectures the differences >between hand-made assembler and optimized compiled code are marginal. >I don't think so, I think there is -still- a factor 2 to 3 difference. > >But only if you build the assembler version from scratch, and carefully >design your datastructures to exploit the strengts of the architecture. > >If you hand optimize generated code you probably won't get as far. >This is because current high level languages can be optimized pretty >well with respect to code. But it's hardly possible to optimize >datastructure declarations, >That is where the assembler programmer can make a gigantic leap. there are other benefits as well. The programmer knows some things about existing "conditions" that the compiler can never know. IE I know when I am looking at a value, that it can *never* be negative in this circumstance, even though it might in others. And I can avoid having to worry about any sign extension, or tests to make sure that a "switch" statement is not going to have to use the "default" condition which takes time to test for. I see the following benefits: 1. program integrated into the machine architecture very carefully, to extract max performance. 2. programmer knows that some things are impossible and can avoid making the tests for those, a switch xxx {} is one example where I might know more about xxx than the compiler could ever hope to. 3. by understanding the architecture, cache data flow, etc, it is possible to optimize things even better, because a compiler has a tough time keeping up with architectural changes and taking advantage of them. I also see the following problem: 1. portability 2. maintenance Both become *very* difficult. Enhancements are even more difficult. Cray Blitz was a bear to work on because of this, but it was fast as heck..
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.