This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC 3/*] benchmarking memcpy and memmove.


Now we come to memcpy,mempcpy and memmove benchmarks.

They have problem of being off by mile. Calling memcpy with same
argument in tight loop makes ssse3 look four times faster than sse2
variant.

But if we do basic randomization like I did here 
http://kam.mff.cuni.cz/~ondra/benchmark_string/i7_ivy_bridge/memcpy_profile/results_rand/result.html
we see that on ivy bridge a __memcpy is faster upto 600 bytes which
contradicts numbers below.

As in reality nobody will write same string at same place over and over
again an randomized results are correct.

                        simple_mempcpy  __mempcpy_ssse3_back __mempcpy_ssse3 __mempcpy_sse2      
Length  416, alignment 26/ 0: 1788  34  52  94
Length  416, alignment  0/26: 1786  34  60  102
Length  416, alignment 26/26: 1786  26  20  94
Length  432, alignment  0/ 0: 1856  18  26  78
Length  432, alignment 27/ 0: 1854  26  60  104
Length  432, alignment  0/27: 1854  34  60  102
Length  432, alignment 27/27: 1862  18  34  94
Length  448, alignment  0/ 0: 1930  18  28  78
Length  448, alignment 28/ 0: 1922  36  62  102
Length  448, alignment  0/28: 1922  34  60  112
Length  448, alignment 28/28: 1922  18  28  94
Length  464, alignment  0/ 0: 1990  20  34  86
Length  464, alignment 29/ 0: 1990  44  70  102
Length  464, alignment  0/29: 1990  34  70  120
Length  464, alignment 29/29: 1998  26  34  102
Length  480, alignment  0/ 0: 2058  26  34  96
Length  480, alignment 30/ 0: 2058  44  60  102
Length  480, alignment  0/30: 2066  44  70  120
Length  480, alignment 30/30: 2058  26  28  102
Length  496, alignment  0/ 0: 2126  26  34  94
Length  496, alignment 31/ 0: 2126  44  70  112
Length  496, alignment  0/31: 2126  34  78  136
Length  496, alignment 31/31: 2126  26  28  102


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]