Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Re: [SLE] Why should I buy 64bit hardware ?
  • From: Örn Hansen <orn.hansen@xxxxxxxxxx>
  • Date: Mon, 3 May 2004 12:13:39 +0200
  • Message-id: <200405031213.39720.orn.hansen@xxxxxxxxxx>
måndag 03 maj 2004 09:10 skrev Lenz Grimmer:
>
> Performance-wise, a program running on a 64bit CPU can sometimes actually
> be slower than on a 32bit CPU (running on the same frequency), as the
> overhead involved in dealing with 64bit data types and addresses can
> require more CPU cycles. Your mileage may vary - this depends on the
> software.
>
A lot of programs, have no use of the enormous bits they use ... take a look
at this one here.

main()
{
int i;

for(i=0;i<255;i++)
printf("number is %d",i);
}

Even 32-bit is too much overhead for the above ... it's an 8 bit program,
that uses 8 bit code data, and everything above it is an overhead. When it
initializes the i variable, it's done in 32bits while only 8 bits are used,
and all math on that variable is 32bit wide, yet only 8 bits are used. A lot
of programs are like the above. Even those programs, that are created for
multimedia, an area that would tremendously benefit from 64bit programming,
are still using 32bit program technology. They may be using MMX or some
extensions, that may or may not benefit from being on a 64bit Athlon.

However, I suspect that we'll be seeing true 64bit programming soon ... and
we'll even be seeing compilers that will produce code that will make use of
both 32bit and 64bit, depending on need/desire. Until then, we'll just have
to get used to all the overhead that we live with daily ... like, most of our
user needs, are character oriented and that's only 8 bits, 16 bits for wide
characters. Everything above that, is an overhead for average use.


< Previous Next >