Re: [CHALLENGE] finding rightmost zero bit
- From: Bart Vandewoestyne <MyFirstName.MyLastName@xxxxxxxxxx>
- Date: Tue, 30 Aug 2005 14:46:58 +0000 (UTC)
On 2005-08-30, Michel OLAGNON <molagnon@xxxxxxxxxxxxxxxxx> wrote:
>
> OK. Here is a reasonable version of the same algorithm:
Online version is updated.
Timing results on my machine:
bartv@vonneumann:/export/home1/bartv/fortran$ ./time_findpos
huge(n) is 2147483647.
Enter first number: 1
Enter last number: 147483647
Total bits counted: 294967286
Bart1's method did it from 1 to 147483647 in 1.81 seconds.
Total bits counted: 294967286
Bart2's method did it from 1 to 147483647 in 1.82 seconds.
Total bits counted: 294967286
Bart3's method did it from 1 to 147483647 in 1.98 seconds.
Total bits counted: 294967286
Michel's method did it from 1 to 147483647 in 18.50 seconds.
Total bits counted: 294967286
Michel2's method did it from 1 to 147483647 in 1.86 seconds.
Regards,
Bart
--
"Share what you know. Learn what you don't."
.
- References:
- [CHALLENGE] finding rightmost zero bit
- From: Bart Vandewoestyne
- Re: [CHALLENGE] finding rightmost zero bit
- From: Michel OLAGNON
- Re: [CHALLENGE] finding rightmost zero bit
- From: Bart Vandewoestyne
- Re: [CHALLENGE] finding rightmost zero bit
- From: Michel OLAGNON
- [CHALLENGE] finding rightmost zero bit
- Prev by Date: Re: [CHALLENGE] finding rightmost zero bit - C programmer's take
- Next by Date: Re: [CHALLENGE] finding rightmost zero bit
- Previous by thread: Re: [CHALLENGE] finding rightmost zero bit
- Next by thread: Re: [CHALLENGE] finding rightmost zero bit
- Index(es):
Relevant Pages
|
|