Mail Archives: djgpp/1997/04/30/15:17:34
Leath Muller wrote:
>
> > I have heard that there is a performance difference between shorts
> > and ints. If anyone could explain when and how much this matters,
> > I would be very grateful. I'm just wondering whether to use ints
> > for everything, shorts for everything, or a mix.
>
> Use int's - shorts have a 1 cycle stall on the pentium...
>
> Leathal.
In addition, the V-pipe gets shut down, thus potentially costing
another cycle. (an instruction that could have executed in parallel
in the V-pipe is prevented from doing so). I would say use ints
by default and shorts only when required by external interfaces or
if the reduction in data space would help with on-chip (8K typ.) data
cache utilization.
regards, tom
- Raw text -