[pacman-dev] [PATCH] Optimize string comparison on 1 character compare

Xavier shiningxc at gmail.com
Tue Nov 27 03:03:17 EST 2007


On Tue, Nov 27, 2007 at 12:07:37AM -0600, Dan McGee wrote:
> No need to do strcmp when we can check for direct equality, but is it worth
> the optimization?
> 

I'm not sure. What does strcmp do anyway when one of its argument is only 1
char? Does it still read the other arg totally?
Well, there is still the function call that is saved, but I couldn't measure
any difference.




More information about the pacman-dev mailing list