strncmp()Submitted by markos on Tue, 01/29/2008 - 17:56.
Description According to the man page, the strncmp() function is similar to strcmp() except it only compares the first (at most) n characters of s1 and s2. It returns an integer less than, equal to, or greater than zero if s1 (or the first n bytes thereof) is found, respectively, to be less than, to match, or be greater than s2. Contrary to strcmp(), for some reason this function is not really optimized. However, in libfreevec it was optimised right from the start. Each CPU in detail: And for comparison here is the result of the same benchmark run on an Athlon X2 5000 (2.5Ghz), running 32-bit code: Results/Comments The comments are the same as in strcmp() but the performance here is even worse for the Athlon X2 than in strcmp(). This really is very bad result. SIMD
|
SIMDUser login |