Page 1 of 1

About Integer / Word values...

PostPosted: Wed Dec 22, 2004 8:15 pm
by MaXMhZ
If I use a word value instead of Integer in Turbo Pascal/Delphi 7...

They get handles MUCH faster...

Is this true in other languages too ?
Since it all runs more or less on the same hardware - I would suspect so...

...

PostPosted: Fri Dec 24, 2004 9:07 pm
by WWSensei
Would depend on whether the OS and patform define a Word as 2 bytes and an integer as 2 or 4. I tend to stay away from using WORD or DWORD as those are generally specific to Windows and not very portable (C++ guy here).

Also, generally WORD is really an unsigned int rather than a normal int which could also explain the difference.