From: Eric Dumazet <[EMAIL PROTECTED]> Date: Thu, 19 Oct 2006 07:12:58 +0200
> A 66 MHz 486 can perform 1.000.000 divisions per second. Is it a 'slow' cpu ? Sparc and some other embedded chips have no division/modulus integer instruction and do it in software. > So... what do you prefer : > > 1) Keep the modulus > 2) allocate two blocks of ram (powser-of -two hash size, but one extra > indirection) > 3) waste near half of ram because one block allocated, and power-of-two hash > size. I thought the problem was that you use a modulus and non-power-of-2 hash table size because rounding up to the next power of 2 wastes a lot of space? Given that, my suggestion is simply to not round up to the next power-of-2, or only do so when we are very very close to that next power-of-2. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html