POV-Ray : Newsgroups : povray.programming : 64 bit or 32 bit? Server Time
28 Jul 2024 14:24:24 EDT (-0400)
  64 bit or 32 bit? (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Thomas
Subject: 64 bit or 32 bit?
Date: 1 Aug 2001 12:40:18
Message: <3B6830E4.586F52D@gmx.net>
Hi,

I finally managed to get the IBM xlc compiler on AIX to compile povray
(See my note in povray.unix) and I was going through the options and saw
that I can generate 64 bit code and 32 bit code, any clue if this will
make a difference to pov's performance? Or will will it have any other
side effect's?

And BTW has anyone ever run pov on Itanium machine? apparently they are
pretty good at floating point operations?

Regards,

Thomas


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: 64 bit or 32 bit?
Date: 1 Aug 2001 13:11:29
Message: <3b683841@news.povray.org>
In article <3B6### [at] gmxnet> , Thomas <tho### [at] gmxnet>  wrote:

> I finally managed to get the IBM xlc compiler on AIX to compile povray
> (See my note in povray.unix) and I was going through the options and saw
> that I can generate 64 bit code and 32 bit code, any clue if this will
> make a difference to pov's performance? Or will will it have any other
> side effect's?

POV-Ray needs only 32 bit ints, so I would expect that with 64 bit ints you
waste a lot of memory bandwidth.

> And BTW has anyone ever run pov on Itanium machine?

No.  If you have one, some benchmarks would be interesting!

> apparently they are pretty good at floating point operations?

I read the same somewhere.  It apparently beats the Alpha (RIP)...


    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Warp
Subject: Re: 64 bit or 32 bit?
Date: 1 Aug 2001 17:02:01
Message: <3b686e48@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
: POV-Ray needs only 32 bit ints, so I would expect that with 64 bit ints you
: waste a lot of memory bandwidth.

  Ints are not necessarily 64 bits long even in a 64 bit system. Longs are.

  What gets longer are pointers (and these are used a lot in machine code
generated from C). Pointers are usually 64 bits long in a 64 bits system.

  Whether compiling to 64 bits is better than to 32 bits depends on the
processor and other hardware. If the processor has excellent 64 bit code
support and poor 32 bit support, then the 64 bit code can be faster. However,
I don't think this is usually the case.
  The problem of having larger data types (usually pointers and if longs
are used) is that caches and code pipelines get full quicker which actually
makes the code slower. This means that in some cases 64-bit code can be
slower then 32-bit.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: 64 bit or 32 bit?
Date: 1 Aug 2001 19:00:21
Message: <3b688a05@news.povray.org>
In article <3B6### [at] gmxnet> , Thomas <tho### [at] gmxnet>  wrote:

> I finally managed to get the IBM xlc compiler on AIX to compile povray

BTW, does the AIX compiler still generate XCOFF files?  And does it have a
32-bit XCOFF option?  I am asking because if it does, could you run the
3.1gx code through it?  I can link XCOFF files on the Mac and maybe xlc code
is already faster than CodeWarrior code - having the compiled code in XCOFF
format would make things a lot easier than using the Metaware compiler...


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: 64 bit or 32 bit?
Date: 1 Aug 2001 19:00:35
Message: <3b688a13@news.povray.org>
In article <3b686e48@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

> : POV-Ray needs only 32 bit ints, so I would expect that with 64 bit ints you
> : waste a lot of memory bandwidth.
>
>   Ints are not necessarily 64 bits long even in a 64 bit system. Longs are.

Ints = Integers.  It also helps to look into the source code before making
only generate statements.  For example meshes (as you love them so much)
will grow about 60%.  Many other data structures will grow, too.

BTW, I am not sure if you aware of it, but C/C++ "int" should always be 32
bit and "long" should always be 64 in current implementations by common
agreement.  An implementation that uses 64 bit "int" types is not very
common to say the least.  For a full reference (not the ultimate one, but
the one that I could find in 10 seconds), see
<http://www.opengroup.org/public/tech/aspen/lp64_wp.htm>

As for PowerPC, all compilers I have seen so far (not necessarily used)
follow the most common implementation.  And of course, internally all
arithmetic is 64 bit wide, even for 32 bit integer arithmetic instructions
(AFAIK, my printed version of the spec is in the USA and I sit in Germany
right now).

And, as you seem to use it occasionally, the same is true for most Sparc-V9
compatible processors - the informative Appendix K of the Sparc-V9
specification suggests the usual implementation will be:
"All other arithmetic operations now operate on 64-bit operands and produce
64-bit results. Application software written for SPARC-V8 cannot detect that
arithmetic operations are now 64 bits wide. This is due to retention of the
32-bit integer condition codes (icc), addition of 64-bit integer condition


Of course, all this is slightly off-topic.....

    Thorsten

PS: As for your general approach, do I really have to assume you (or anybody
else here) are one of the people who need a "Do not use this toaster while
taking a bath." disclaimer - <http://www.asktog.com/columns/049Lawyers.html>

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Thomas
Subject: Re: 64 bit or 32 bit?
Date: 2 Aug 2001 08:17:25
Message: <3B6944BB.1318B6A@gmx.net>
Thorsten Froehlich wrote:

> BTW, does the AIX compiler still generate XCOFF files?  And does it have a
> 32-bit XCOFF option?  I am asking because if it does, could you run the
> 3.1gx code through it?  I can link XCOFF files on the Mac and maybe xlc code
> is already faster than CodeWarrior code - having the compiled code in XCOFF
> format would make things a lot easier than using the Metaware compiler...

It produces 32 bit XCOFF object files and can run the code as well. I compiled
it for Power processors but I can compile it for PowerPC as well but I don't
think it does 750 or 7400 code, just 604 code.

I tried to compile it with 64 bits but it doesn't link, I think it is because
the machine the compiler runs on isn't a Power machine.

And I tried to get my hands on a Itanium machine but no luck so far..... :(


Thomas


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: 64 bit or 32 bit?
Date: 2 Aug 2001 08:49:07
Message: <3b694c43@news.povray.org>
In article <3B6### [at] gmxnet> , Thomas <tho### [at] gmxnet>  wrote:

> It produces 32 bit XCOFF object files and can run the code as well. I compiled
> it for Power processors but I can compile it for PowerPC as well but I don't
> think it does 750 or 7400 code, just 604 code.

Hmm, 604 should do fine.  The FPUs in the 604 and 7xx PowerPCs are not much
different in execution time as that it should be a major problem, I think.

Only that the 604 can dispatch 4 (AFAIK) instructions per clock cycle while
all 7xx except the 7450 can only dispatch three instructions per clock
cycle.  But I suspect the major problem with CodeWarrior is that it doesn't
schedule FPU instructions at all (i.e. interleave FPU and integer
instructions, not even float load/stores), so any improvement in that part
of the code should outweigh the possible slowdowns in the rare case that
four instructions can really be dispatched in one cycle...

    Thorsten

PS: In theory Macs should emulate all Power 32 bit instructions.  Of course
it would slow down things :-)

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Thomas
Subject: Re: 64 bit or 32 bit?
Date: 3 Aug 2001 07:46:40
Message: <3B6A8F00.35718D67@gmx.net>
Are you sure that the ABI of AIX and Mac is similar enough to make sure that it
doesn't cause any problems? The PowerPC ABI for embedded application is different
AFAIK ( the one generated by the Metaware compiler)


Thorsten Froehlich wrote:

> IPS: In theory Macs should emulate all Power 32 bit instructions.  Of course
> it would slow down things :-)

Interesting that it does, but I'm pretty sure I can get it to make pure PowerPC
stuff.


Thomas


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: 64 bit or 32 bit?
Date: 3 Aug 2001 09:08:57
Message: <3b6aa269@news.povray.org>
In article <3B6A8F00.35718D67@gmx.net> , Thomas <tho### [at] gmxnet>  wrote:

> Are you sure that the ABI of AIX and Mac is similar enough to make sure that
> it doesn't cause any problems? The PowerPC ABI for embedded application is
> different AFAIK ( the one generated by the Metaware compiler)

When Apple ported Mac OS from 68K to PowerPC they used IBM compilers and AIX
at first.  For this reason the format is the same.  In fact it is so similar
that I can still generate code for Power processors with Apples own PowerPC
compiler (which is unfortunately not really supported anymore).  If I had
the right libraries I could probably even compile and link AIX applications
on a Mac!


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: 64 bit or 32 bit?
Date: 3 Aug 2001 09:11:00
Message: <3b6aa2e4$1@news.povray.org>
Just to be be sure, if you would send me just one of the xcoff files I could
run it through a Apple xcoff viewer and see if it accepts it.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.