1. BIT OPERATIONS
- Posted by Jay Turley <jturley at MDC.COM> Oct 15, 1998
- 554 views
I am using and_bits() and its ilk. I have noticed in some example code that some of you have written that you are using machine operations for and/or/xor functions, i.e. direct memory operations. Is there really _that_ much of a performance increase? The progs I have seen using it are graphics examples, and so I know they need to be basically as fast as possible. But if I have: atom a, b integer p a = #00FF p = power(2,6) b = and_bits(a,p) how much processing am I losing by not using the direct memory ops (from my misty memory, they seemed to be ASM register ops)? Anyone have an idea? Thank you very much, -Jay Turley
2. Re: BIT OPERATIONS
- Posted by Robert Craig <rds at EMAIL.MSN.COM> Oct 19, 1998
- 539 views
a few days ago Jay Turley wrote: > I am using and_bits() and its ilk. I have noticed in some > example code that some of you have written that you are > using machine operations for and/or/xor functions, > i.e. direct memory operations. Is there really _that_ much > of a performance increase? The progs I have seen > using it are graphics examples, and so I know they need > to be basically as fast as possible. But if I have: > atom a, b > integer p > a = #00FF > p = power(2,6) > b = and_bits(a,p) > how much processing am I losing by not using the direct memory ops > (from my misty memory, they seemed to be ASM register ops)? If you are referring to bitwise.e written by Jacques Deschenes 2 years ago, then I can tell you that Euphoria's bitwise operators are much faster than his routines. He wrote that machine code for Euphoria 1.4 which did not have good support for bits. The overhead cost of calling his machine code is much greater than the cost of calling and_bits(), or_bits() or xor_bits() in Euphoria 1.5 or later. Regards, Rob Craig Rapid Deployment Software http://members.aol.com/FilesEu/