[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-hackers
Subject: Re: memmem small optimalisation
From: Joerg Sonnenberger <joerg () britannica ! bec ! de>
Date: 2012-02-24 8:11:51
Message-ID: 20120224081150.GB23692 () britannica ! bec ! de
[Download RAW message or body]
On Thu, Feb 23, 2012 at 05:34:03PM -0800, Xin Li wrote:
> Did you benchmarked the change? Changes like this has to be done very
> carefully since it's possible that the extra time spent on addition
> and subtractions, when multiple by the length of the "long" string,
> may actually defeat the benefit of one less byte worth memory compare
> because the effect of CPU's data cache.
More importantly, if the input was originally aligned, the additional
byte is ~free.
Joerg
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic