Advertisement

The use of DWORD's

Started by August 21, 1999 02:33 AM
1 comment, last by drago 25 years, 3 months ago
in 32 bit mode unsigned long = unsigned int = dword. (you may also have without unsigned but that depends on the compilators defaults...)
Is it more efficient to use DWORD's instead of int/long/etc. on 32-bit CPU's? Even if it used for coordinates, e.q. would one use DWORD x, DWORD y or INT x, INT y?

------------------
Drago

osu!
Advertisement
sizeof(int) is rarely defined in books, since it differs between systems. It really differs between compilers, but a good compiler will define an int to be the same size as a single cpu word. That is, on a 32 bit machine, an int will take 32 bits == 4 bytes.

<rant>
This is of course assuming that compilers keep up with the systems they're built for. Pentiums have a 64 bit cpu, if only their operating system(s) would actually support it.
</rant>

White Fire

This topic is closed to new replies.

Advertisement