POV-Ray : Newsgroups : povray.programming : 64 bit or 32 bit? : Re: 64 bit or 32 bit? Server Time
28 Jul 2024 12:27:50 EDT (-0400)
  Re: 64 bit or 32 bit?  
From: Thorsten Froehlich
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

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