TIP: Click on subject to list as thread! ANSI
echo: delphi
to: GARY WEINFURTHER
from: STEVE ROGERS
date: 1997-08-15 07:44:00
subject: CARDINAL

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.