[Codel] [PATCH net-next] codel: use Newton method instead of sqrt() and divides

David Miller davem at davemloft.net
Sat May 12 16:45:13 EDT 2012


From: Eric Dumazet <eric.dumazet at gmail.com>
Date: Sat, 12 May 2012 22:40:56 +0200

> 24 bit of precision for the reciprocal value is more than enough (Van
> suggested 16 bits in fact), so we have actually room for 7 bits if
> needed.

Using a u16 would also work for me.

> By the way, gcc on x86 generates nice "and 0xfffffffe,%eax" instruction
> for (vars->rec_inv_sqrt << 1).

Yeah but what do stores of ->rec_inv_sqrt look like?



More information about the Codel mailing list