|
![](/i/fill.gif) |
In article <MPG.1adcd012e074ae8989a14@news.povray.org>,
Patrick Elliott <sha### [at] hotmail com> 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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tag povray org>
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |