[Coco] Re: optimizing

Gene Heskett gene.heskett at verizon.net
Thu Dec 11 00:10:00 EST 2003


On Wednesday 10 December 2003 14:52, Roger Taylor wrote:
>At 01:57 PM 12/10/2003 -0500, you wrote:
>>In a message dated 12/10/03 12:46:19 AM Eastern Standard Time,
>>
>>rtaylor at bayou.com writes:
>> > f(somevariable=true) then
>> >  //      I just tested somevariable twice
>> >  endif;
>> >
>> >  or how about:
>> >
>> >  if(somevariable<>0) then
>> >  endif;
>>
>>These are just redundant and wasteful, but how about
>>     while(UnsignedVar >= 0) ... ;
>>which gives you lots of stare-at-screen time when run?
>
>Fortunately, HLA supports assembly statements mixed with high-level
>stuff.  At any time you want to do better than the compiler, you
> just start entering the Pentium instructions.  No #asm directives
> are needed.
>
>>BTW, the 6809 C compiler is buggy re
>>     if(IntVar)
>>and must be written
>>     if(InVar != 0)
>>since the compiler tests only one byte of the 16-bit D register.
>
>Remind me to NEVER use that compiler.  Jeez.
>Wonder how many headaches they caused due to this??

Humm, yeah, but most of us knew that, so the only thing we tested 
singly was a 1 byte var, which of course got SEX'ed into an int 
anyway, but that worked.

-- 
Cheers, Gene
AMD K6-III at 500mhz 320M
Athlon1600XP at 1400mhz  512M
99.22% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2003 by Maurice Eugene Heskett, all rights reserved.




More information about the Coco mailing list