POV-Ray : Newsgroups : povray.advanced-users : Bitwise AND : Re: Bitwise AND Server Time
29 Jul 2024 02:35:41 EDT (-0400)
  Re: Bitwise AND  
From: Christopher James Huff
Date: 8 Apr 2004 22:56:45
Message: <cjameshuff-A43E44.22573208042004@news.povray.org>
In article <MPG.1adcd012e074ae8989a14@news.povray.org>,
 Patrick Elliott <sha### [at] hotmailcom> wrote:

> Well, true. The fact that they are floats makes it a bit more 
> interesting. I was thinking more in terms of integer values. Their are 
> likely some tricks you can do with simple bitwise operations for color or 
> even heightfield, etc. that could be theoretically faster in some cases. 
> I don't have any specific application in mind that I am thinking of at 
> the moment though.

For parse-time operations, the difference in execution time between a 
bit shift and multiplication or division by a power of 2 would be 
unmeasurable, any differences that exist would be dwarfed by the 
overhead of parsing the code. For the VM or even native code, the speed 
difference is very minor, if the operation isn't changed by the 
compiler. You use the operation that best suits what you are doing. For 
POV scenes, bitwise operators aren't very useful, and can be implemented 
using strings or arrays well enough that a built-in version is 
unnecessary.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

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