[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(usagi-users 03104) Re: ipv6_addr_cmp performance patch



On Tue, 9 Nov 2004, Craig, Dave wrote:

Please consider the attached patch for incorporation into the next Linux
2.6 release.  I found that using the __builtin_memcmp GCC intrinsic for
doing IPv6 address comparison a lot more slow than integer comparison.
In significant SCTP workloads I found address comparison taking roughly
10% of the CPU time.  After changing the address comparison to an
integer-based approach the comparison consumed 5% of the CPU time.

One small comment about your patch: It changes the semantics of ipv6_addr_cmp() from returning sort order A <=> B to boolean A != B. This may be fine, but not if there is users of ipv6_addr_cmp() expecting the sort order property.


Regards
Henrik