1. BIT OPERATIONS

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

new topic     » topic index » view message » categorize

2. Re: BIT OPERATIONS

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/

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu