On Sun, 6 Apr 2008 10:03:43 -0700 (PDT), "dean gaudet" <dean@arctic.org> said:Hello Dean, The current generic implementation of ffz is O(lg(n)) already, but the version you suggest might indeed be a bit faster if the compiler recognises that is can use conditional moves and the architecture can handle large constants efficiently. On the other had, the bit-search functions tend to be avoided as much as possible, because they are often not implemented as a hardware instruction and even if they are implemented in hardware, they might be slow. The generic version is slow anyhow. That's why the bitmap searches first test if a word in the bitmap is all-0-bits/all-1-bits. The single-word version of ffz might even be better off if it was optimized for size instead of being fully unrolled! Note: mask32 = ~0ul; mask16 = mask32 ^ (mask32 << 16), mask8 = ... Greetings, Alexander -- Alexander van Heukelum heukelum@fastmail.fm -- http://www.fastmail.fm - Or how I learned to stop worrying and love email again --
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Tim Tassonis | reiser4 for 2.6.27-rc1 |
| Roland Dreier | Re: Integration of SCST in the mainstream Linux kernel |
| Jarek Poplawski | Re: [BUG] New Kernel Bugs |
git: | |
| Junio C Hamano | Re: Comments on recursive merge.. |
| Ken Pratt | Re: pack operation is thrashing my server |
| Junio C Hamano | [ANNOUNCE] GIT 1.5.4 |
| Chris Hoffman | git-daemon on Windows? |
| Peter Zijlstra | [BUG?] sendfile / distcc |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Mark Lord | Re: 2.6.25-rc8: FTP transfer errors |
| Ilpo Järvinen | Re: [PATCH 2/4] tcpv6: trivial formatting changes to send_(ack|reset) |
| Richard Stallman | Real men don't attack straw men |
| Diana Eichert | OpenBSD on decTOP? |
| Jeff Ross | U320 Drive on U160 controller? |
| Sebastian Reitenbach | problems with hoststated and relayd |
