Author: Heiner Marxen
Date: 13:55:08 05/06/00
Go up one level in this thread
On May 06, 2000 at 16:35:51, Flemming Rodler wrote: >Hi, > >I am right in assuming that the register declaration i C is superfluous since >mordern compiles usually are very good at optimizing code without my advice as >to which variable are heavly used and should therefore be placed in a register? > >I have tried to fiddle around with placing register declerations in front of >various variables in a move generation function that i am working on and it >seems to have no effect at all. > >By the way im using gcc with -O3 turned on. Yes, you are right. With optimization on (at least) the "register" keyword has no effect on most modern compilers (they believe to know better than you). Without optimization turned on there may be a noticable effect. But a typical chess program has no reason to turn optimizations off. AFAIK, you can just ignore the "register" keyword (not use it at all), unless you plan to port to some really old platform/compiler. Heiner >Thanks for any suggestions >Flemming
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.