From mboxrd@z Thu Jan 1 00:00:00 1970 References: <1411330.QJAbfBr5F9@blitz> <1E6996DB-2712-4AC6-A860-B09C06A8638E@quintile.net> From: steve Content-Type: multipart/alternative; boundary=Apple-Mail-A64393CB-23B7-4B9A-B3D4-6D99F5C2BFFE In-Reply-To: Message-Id: <3E93FE94-76BC-4B38-9FB2-DEDC5C3CEF9E@quintile.net> Date: Mon, 7 May 2012 09:53:01 +0100 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) Subject: Re: [9fans] integer width on AMD64 (was: Re: AMD64 system) Topicbox-Message-UUID: 851baf48-ead7-11e9-9d60-3106f5b1d025 --Apple-Mail-A64393CB-23B7-4B9A-B3D4-6D99F5C2BFFE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii sorry for being vague. treating pixels as 64bit on amd64 as that is the natural size for the machin= e, vs using 32bits per pixel - 10 bits of r, g, and b or y, u, and v plus 2 spa= re leads to a significant speedup; where significant is a number lost in the mi= sts of time. i believe this speedup is due to the reduction in the rate of cache line ref= ills, as forsyth described. -Steve On 6 May 2012, at 12:43 PM, Comeau At9Fans wrote: > I've heard that 64-bit is not an immediate win over 32 for graphics and su= ch, but then again also heard that 32 bit is not the pits, and that it more o= r less becomes a wash. So, in your case, what is is about 32 that makes it a= *significant* win, given that the space would have been used in either case= (I don't know if that's true, but assuming it is)? (And sorry if I've con= nected "graphics and such" with image processing since it may be you're doin= g something I'm not realizing and so we might be talking about different thi= ngs.) >=20 > On Sun, May 6, 2012 at 5:20 AM, steve wrote: > i think this is an often misunderstood fact, 32bit ints are, in my experie= nce, > a significant win compared with 64bit when doing memory intensive work > - image processing in my case. >=20 > -Steve >=20 >=20 > On 5 May 2012, at 06:48 PM, Charles Forsyth > . > > if it's performance you're worried about, for programs that don't care a= bout width, i'd expect 32 bits at least > > to match performance with 64 bits (if there's a measurable difference). f= or one thing, cache lines will contain > > more values, and several will be fetched at once when cache lines are fi= lled. > > >=20 >=20 >=20 >=20 > --=20 > Greg Comeau / 4.3.10.1 with C++0xisms now in beta! > Comeau C/C++ ONLINE =3D=3D> http://www.comeaucomputing.com/tryitout > World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90. > Comeau C/C++ with Dinkumware's Libraries... Have you tried it? >=20 --Apple-Mail-A64393CB-23B7-4B9A-B3D4-6D99F5C2BFFE Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=utf-8
sorry for being vague.

treating pixels as 64bit on amd64 as that is the natural size for the machine,
vs using 32bits per pixel - 10 bits of r, g, and b or y, u, and v plus 2 spare
leads to a significant speedup; where significant is a number lost in the mists of time.

i believe this speedup is due to the reduction in the rate of cache line refills,
as forsyth described.

-Steve


On 6 May 2012, at 12:43 PM, Comeau At9Fans <comeauat9fans@gmail.com> wrote:

I've heard that 64-bit is not an immediate win over 32 for graphics and such, but then again also heard that 32 bit is not the pits, and that it more or less becomes a wash.  So, in your case, what is is about 32 that makes it a *significant* win, given that the space would have been used in either case (I don't know if that's true, but assuming it is)?   (And sorry if I've connected "graphics and such" with image processing since it may be you're doing something I'm not realizing and so we might be talking about different things.)

On Sun, May 6, 2012 at 5:20 AM, steve <steve@quintile.net> wrote:
i think this is an often misunderstood fact, 32bit ints are, in my experience,
a significant win compared with 64bit when doing memory intensive work
- image processing in my case.

-Steve


On 5 May 2012, at 06:48 PM, Charles Forsyth <charles.forsyth@gmail.com>
.
> if it's performance you're worried about, for programs that don't care about width, i'd expect 32 bits at least
> to match performance with 64 bits (if there's a measurable difference). for one thing, cache lines will contain
> more values, and several will be fetched at once when cache lines are filled.
>




--
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?

--Apple-Mail-A64393CB-23B7-4B9A-B3D4-6D99F5C2BFFE--