Re: Bit Scan Forward and Reverse

2008-01-18 Thread [EMAIL PROTECTED]
On Jan 18, 2:01 pm, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote: > Hi, I'm writing an app in python, and I'm storing some a lot of data in > bitmaps. > I need a way to find the first or latest set bit in a 64bit number, and > for that I've implemented a small routine. > > Thing is that this routi

Re: Bit Scan Forward and Reverse

2008-01-18 Thread Matimus
On Jan 18, 12:01 pm, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote: > Hi, I'm writing an app in python, and I'm storing some a lot of data in > bitmaps. > I need a way to find the first or latest set bit in a 64bit number, and > for that I've implemented a small routine. > > Thing is that this rout

Bit Scan Forward and Reverse

2008-01-18 Thread Thomas Dybdahl Ahle
Hi, I'm writing an app in python, and I'm storing some a lot of data in bitmaps. I need a way to find the first or latest set bit in a 64bit number, and for that I've implemented a small routine. Thing is that this routine is not as fast as I'd wish. I know most processors implement BSF an