[PATCH] D46163: [DO NOT SUBMIT] Do strlen() while computing xxhash

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 27 02:23:08 PDT 2018


grimar added inline comments.


================
Comment at: llvm/lib/Support/xxhash.cpp:182
+    H = mergeRound(H, V2);
+    H = mergeRound(H, V3);
+  }
----------------
I remember that when I experimented with all such stuff, at some point I also had the `Hash` out parameter passed by reference like `H` here.
And assigning multiple times to it in a loop, like you do, was slow for me I believe. Because when I changed the code to do the single assign after the loop, at the end of the function, profiler showed a much better result.


https://reviews.llvm.org/D46163





More information about the llvm-commits mailing list