[PATCH] D27155: Merge strings using concurrent hash map (3rd try!)
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 20:36:35 PST 2016
ruiu updated this revision to Diff 79367.
ruiu added a comment.
After a nonstop whole day hacking, I somehow managed to get deterministic
output from the concurrent hash table.
The new number is 5.230 second. This is slightly slower than the previous
nondeterministic implementation (5.136 seconds), but that is not bad at all.
That is about the same as the probabilistic algorithm (5.227 seconds) and
faster than the sharded hash table algorithm (5.666 seconds).
Taking the fact that this produces deterministic, minimal output into account,
this is definitely the best algorithm so far.
The downside is that the implementation is now a bit tricky. I don't think
this is hard to read, but it's undeniably more complicated than the original,
single-threaded implementation. I believe that's acceptable in this case
though.
https://reviews.llvm.org/D27155
Files:
ELF/InputSection.h
ELF/OutputSections.cpp
ELF/OutputSections.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27155.79367.patch
Type: text/x-patch
Size: 10322 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161128/57cea193/attachment.bin>
More information about the llvm-commits
mailing list