On Wed, Jan 25, 2006 at 08:02:50PM +0000, Russell King wrote: > > + s = 16; if (word << 16 != 0) s = 0; b += s; word >>= s; > > + s = 8; if (word << 24 != 0) s = 0; b += s; word >>= s; > > + s = 4; if (word << 28 != 0) s = 0; b += s; word >>= s; ... > Basically, shifts which depend on a variable are more expensive than > constant-based shifts. Actually, they're all constant shifts. Just written stupidly. r~ |
| Previous by Date: | Re: [PATCH 5/6] fix warning on test_ti_thread_flag(), David S. Miller |
|---|---|
| Next by Date: | [PATCH] mips: gdb-stub.c: fix parse error before ; token, Alexey Dobriyan |
| Previous by Thread: | Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h, Ian Molton |
| Next by Thread: | Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h, Edgar Toernig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |