Slight modification. The benchmark was limited to 32 bit values,
and tcp_cubic does cube_root(x * K). I modified the benchmark
program to generate these more typical numbers and reran.
Also since numbers are larger just use 64 bit divide on 64 bit cpu.
Original-Bisect Optimize-Bi
From: Stephen Hemminger <[EMAIL PROTECTED]>
Date: Thu, 15 Dec 2005 15:36:08 -0800
> $ ./croot 1000
>
> Opteron 2.0 Ghz
> math 9671505106 1.230814
> old 9676503359 1.287217
> bisect 9666502089 1.074139
> newton 9671507303 1.168087
>
> Xeon (32bit) 2.4 Ghz
> math 9671505106 3.047887
> old 9676
On Fri, 16 Dec 2005 06:21:02 +1100
Anton Blanchard <[EMAIL PROTECTED]> wrote:
>
> Hi Stephen,
>
> > Replace cube root algorithim with a faster version using Newton-Raphson.
> > Surprisingly, doing the scaled div64_64 is faster than a true 64 bit
> > division on 64 bit CPU's.
>
> Interesting, wh
Hi Stephen,
> Replace cube root algorithim with a faster version using Newton-Raphson.
> Surprisingly, doing the scaled div64_64 is faster than a true 64 bit
> division on 64 bit CPU's.
Interesting, what cpu was this on? Was there much difference between the
two methods?
Anton
-
To unsubscribe
Replace cube root algorithim with a faster version using Newton-Raphson.
Surprisingly, doing the scaled div64_64 is faster than a true 64 bit
division on 64 bit CPU's.
Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
--- net-2.6.16.orig/net/ipv4/tcp_cubic.c
+++ net-2.6.16/net/ipv4/tcp_cubic.