Re: 32-bit vs. 64-bit x86 Speed

haberg@math.su.se (Hans Aberg)
26 Apr 2007 09:41:41 -0400

          From comp.compilers

Related articles
[11 earlier articles]
Re: 32-bit vs. 64-bit x86 Speed DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-04-14)
Re: 32-bit vs. 64-bit x86 Speed DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-04-14)
Re: 32-bit vs. 64-bit x86 Speed gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-04-18)
Re: 32-bit vs. 64-bit x86 Speed haberg@math.su.se (2007-04-23)
Re: 32-bit vs. 64-bit x86 Speed haberg@math.su.se (2007-04-23)
Re: 32-bit vs. 64-bit x86 Speed anton@mips.complang.tuwien.ac.at (2007-04-25)
Re: 32-bit vs. 64-bit x86 Speed haberg@math.su.se (2007-04-26)
Re: 32-bit vs. 64-bit x86 Speed haberg@math.su.se (2007-04-27)
Re: 32-bit vs. 64-bit x86 Speed jon@ffconsultancy.com (Jon Harrop) (2007-04-28)
| List of all articles for this month |
From: haberg@math.su.se (Hans Aberg)
Newsgroups: comp.compilers
Date: 26 Apr 2007 09:41:41 -0400
Organization: Virgo Supercluster
References: 07-04-031 07-04-045 07-04-091 07-04-103
Keywords: architecture
Posted-Date: 26 Apr 2007 09:41:41 EDT

anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:


> >>From what I have heard, a 32-bit program compiled for a 64-bit CPU, will
> >in effect run in something alike 32-bit emulation mode. (A deliberate move
> >in the design of the 64-bit architecture, in order to avoid portability
> >problems.) So unless it actually has new code, directly rewritten as to
> >take advantage of the 64-bit architecture, it will in fact run somewhat
> >slower (of the CPU frequencies are the same).
>
> Slower than what?


This should be for the Mac 32-bit and 64-bit CPU models of similar
speed: a typical C program written for 32-bit CPU, thus heavily
relying on int types, and just recompiled for the 64-bit model,
without hands-on rewriting. The size of int and some other such types
are in fact the same on both architectures, and does not grow much in
size, so it will in fact be packed in memory as in the 32-bit
version. I do not know any details though.


> E.g., looking at our Latex benchmark again, ...


It depends what your Latex benchmark does. Does it use math libraries that
are optimized for the architectures or use libraries that can be
parallelized as to take advantage of multicore? If so, the speedup could
be considerable.


> ...I see that the Athlon 64 beats a faster clocked Athlon XP even in
> 32-bit mode:
...
> Likewise, a 2400MHz Core 2 beats a 2000MHz Pentium M by more than a
> factor of 1.2:


And what is the size of an int on your 32-bit and 64-bit models?


    Hans Aberg
[In 32 bit mode, an Athlon 64 is basically a Pentium. He's saying that
these chips run legacy 32 bit code faster than 32 bit chips do, which is
not all that surprising if they can use the wide data paths for things
like code fetches. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.