64-bit vs 32-bit

Bryan Kadzban bryan at kadzban.is-a-geek.net
Mon Mar 26 09:57:37 PDT 2007


On Mon, Mar 26, 2007 at 11:24:47AM -0500, Bruce Dubbs wrote:
> Ken,
>   I wasn't aware that the IA64 had additional registers.

Well, IA64 != 64-bit.  The IA64 architecture is 64-bit, and it does have
tons more registers (something like 128 or 256, with a window of 32 or 64
visible at one time, IIRC).  But most 64-bit machines are *not* IA64;
the IA64 architecture is pretty much dead.

Just about everything Intel-compatible that's running in 64-bit mode is
x86-64 or equivalent (this is AMD's 64-bit architecture, which Intel
copied back into their later chips and named "EM64T" after they realized
how much better it was than IA64).  This architecture has 32 registers
that are all always visible (no windowing); which is still more than
32-bit code had (there were only 16 registers before).  Of course the
registers are twice as wide, too (on both IA64 and x86-64, although IA64
has an extra bit on each register that when set, means "this register
has an invalid value in it"; it's used during speculative execution).

>   My initial reaction is that context changes are more expensive.

I don't remember where I heard this, but supposedly this is true on
EM64T processors.  It's not true on AMD64, though; their context
switches are supposed to be considerably faster.  (Now, whether that's
"faster than 32-bit mode" or "faster than Intel's", I'm not sure.  And
of course this should probably be treated as hearsay, because as I said,
I don't remember where I heard it.)

> One
> benchmark that would be interesting is how long it takes to build gcc or
> the kernel on the same hardware but running an IA32 system or an IA64
> system.  Another benchmark would be doing something like a ffmpeg format
> conversion of a reasonably large video file.

IA64 is also horribly slow at running 32-bit code (or at least, it was;
maybe they fixed that in Itanium 2?), so if you want to compare it to
itself, 64-bit will likely always win.  But I don't think there's hardly
any slowdown in 32-bit mode on x86-64; I can try to find out for sure
tonight.  (If I remember, I'll try to transcode 10-20 minutes' worth of
MPEG2 video to xvid (MPEG4) on both architectures.  Both tests will run
under the same 64-bit kernel, but one will be a 32-bit process and the
other will be 64.  That means I'll have to build a temporary 32-bit
transcode, but that's not too difficult.)

>   I doubt something like web browser response or normal office tasks
> like email, text processing, etc would have a noticeable difference.

I'd certainly agree with that -- but then, email, text processing, etc.,
*never* see a speedup, because they're always waiting on the user.  ;-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20070326/57296060/attachment.sig>


More information about the lfs-dev mailing list