Mail Archives: djgpp/1998/08/06/20:36:13
Endlisnis wrote:
>
> Eli Zaretskii wrote:
>
> > More accurately, use int where its size doesn't matter and you want the
> > fastest code, and short/long where the size matters.
>
> Are you saying that 'int's are faster than 'short's in DJGPP?
They are. The x86 can execute 32-bit instructions just as fast as
16-bit ones. However, when in protected mode, the 32-bit form is the
default. To execute the 16-bit form requires a one-byte prefix (66h,
usually). This adds a byte to the size of the code, and also requires
an additional cycle to decode.
That is not necessarily true in general, but often is.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -