Re: [networking-discuss] Re: [perf-discuss] Followup on microoptimizing ip_addr_match()

2007-06-19 Thread Dan McDonald
On Mon, Jun 18, 2007 at 01:07:26PM -0700, Bart Smaalders wrote: > On x86, why not inline a bswap instruction? That *is* the actual implementation of htons()/ntohs(). Here, check it out! >From $SRC/uts/intel/ia32/ml/ia32.il: / / Networking byte order functions (too bad, Intel has the wrong by

[perf-discuss] Followup on microoptimizing ip_addr_match()

2007-06-18 Thread Dan McDonald
(This time, using e-mail instead of the web form...) Hello again! After what suggestions I saw (all on networking-discuss...), I put together a multiple-choice question. Consider thie _LITTLE_ENDIAN section in this code fragment, which is known to be an improvement on SPARC: ===

[perf-discuss] Micro-optimization of ip_addr_match() - is slower on amd64, faster on SPARC

2007-06-15 Thread Dan McDonald
Sigh! I try and do some good by implementing this bugfix: 6287109 ip_addr_match and its callers could be tuned and instead get mixed results. My SPARC numbers go up, but my amd64 numbers drop slightly. I'm that by saving a function call explains the win on SPARC. My hack requires htonl()