Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.codewarrior Subject: Re: Optimisation Date: Mon, 11 Jan 1999 09:28:13 +0000 Organization: Sony Computer Entertainment Europe Lines: 20 Message-ID: <3699C42D.E5F50301@scee.sony.co.uk> References: <01be3c25$1e96ac00$0a3ddec2@guildfoc> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en Miles Buzzing wrote: > > Does anyone know how well CodeWarrior optimises constants at compile time? > For example, if I include a #define statement such as - #define VELOCITY > (2< the constant ( 8192) or as a logical shift? Most compilers will try to calculate constants as far as they can without losing accuracy. So 1<<10 will compile to 1024. Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe "I TOLD you boys not to go in there. What IS your fascination with my Forbidden Closet of Mystery?" -- Police Chief Wiggam