GW>Steve Rogers mentioned this to Gary Weinfurther:
GW> GW>> You should use integers, which are always sized for best
rformance.
GW> SR> As opposed to Words ?
GW>Right. An integer has different meanings depending on the base
>platform. In Delphi 1, an integer is 16 bits. In Delphi 2 and 3, an
>integer is 32 bits.
OK, yes. I checked and you're correct. I've now started using integers
for all my counters, etc. This breaks my long tradition of using
words...
GW> GW>> They take less room (thus are good for record storage). The CPU has
to
> GW>> split
> >> 32 bit value to operate on them, so they are slightly slower to
perate
> >> on.
GW> SR> Huh? I thought 32 bit CPUs worked, well, with 32 bits.
GW>That's what I said. The CPU works faster with 32 bits, and has to do
xtra
>work to operate on 8 or 16 bit values.
Oh, OK, I thought you were saying the CPU had to break 32 bit values
in order to work on them (my misinterpretation), but you mean the CPU
has to break a 32 bit value to work on the 16 bit value inside. This
is the reason I used words instead of bytes in 16 bit Pascal. I'm with
you now.
But are we not splitting hairs? Haven't so many compromises already
been made in the creation of Win 95 and Delphi that our efforts at
such optimizations are lost in the sea of "Just throw more CPU power
at it!" attitudes? ;)
--- PCBoard (R) v15.3/M 5
---------------
* Origin: Riverdale, Ga (1:133/9024)
|