Add comments

This commit is contained in:
Alexey Milovidov 2021-09-19 22:26:16 +03:00
parent 86f38283ff
commit 894f4908fa
2 changed files with 7 additions and 1 deletions

View File

@ -96,6 +96,11 @@ inline bool compareSSE2x4(const char * p1, const char * p2)
inline bool memequalSSE2Wide(const char * p1, const char * p2, size_t size)
{
/** The order of branches and the trick with overlapping comparisons
* are the same as in memcpy implementation.
* See the comments in base/glibc-compatibility/memcpy/memcpy.h
*/
if (size <= 16)
{
if (size >= 8)

View File

@ -659,9 +659,10 @@ int main(int argc, char ** argv)
if (!m || m == 100) bench<StringRef_CompareAlwaysTrue> (data, "StringRef_CompareAlwaysTrue");
if (!m || m == 101) bench<StringRef_CompareAlmostAlwaysTrue> (data, "StringRef_CompareAlmostAlwaysTrue");
if (!m || m == 111) bench<StringRef> (data, "StringRef");
/// 10 > 8, 9
/// 1, 2, 5 - bad
return 0;
}