Uses of Short

preece at ccvaxa.UUCP preece at ccvaxa.UUCP
Sat Sep 14 01:04:00 AEST 1985


> > `What are the stimuli that would provoke Guy to respond by typing `short'
> > at the C compiler?'
>  How about an array of 10000 counters, each one of which won't ever get
> over 10000.  Perfect opportunity for "short" on any machine, especially
> machines like mine which has 32-bit "int"s.  /* Written  7:40 pm  Sep
> 10, 1985 by guy at sun.uucp in ccvaxa:net.lang.c */
----------
Of course, on some machines halfword arithmetic is slower than fullword
arithmetic and on others the opposite is true, so if speed is a major
consideration you may need to tailor your declaration to the specific
machine you're working on.  Maybe "int" should by convention be
the whatever style integer is the fastest to work with...

-- 
scott preece
gould/csd - urbana
ihnp4!uiucdcs!ccvaxa!preece



More information about the Comp.lang.c mailing list