<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 24, 2015 at 10:58 AM, Keno Fischer via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">loladiro retitled this revision from "[RuntimeDyld] DenseMap -> std::map" to "[RuntimeDyld] DenseMap -> std::unordered_map".<br>
loladiro updated this revision to Diff 41064.<br>
loladiro added a comment.<br>
<br>
Tested with unordered_map. Seems marginally better in my tests, but probably not statistically significant given my methodology. Still there's no reason the map should be ordered, so might as well use an unordered_map.<br></blockquote><div><br></div><div>But DenseMap isn't ordered either, so this doesn't remove ordering - it was never there.<br><br>Might be worth having some more numbers before we'd make that change... </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D14910" rel="noreferrer" target="_blank">http://reviews.llvm.org/D14910</a><br>
<br>
Files:<br>
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp<br>
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h<br>
<br>
Index: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h<br>
===================================================================<br>
--- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h<br>
+++ lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h<br>
@@ -30,6 +30,7 @@<br>
 #include "llvm/Support/SwapByteOrder.h"<br>
 #include "llvm/Support/raw_ostream.h"<br>
 #include <map><br>
+#include <unordered_map><br>
 #include <system_error><br>
<br>
 using namespace llvm;<br>
@@ -229,7 +230,7 @@<br>
  Â // Relocations to sections already loaded. Indexed by SectionID which is the<br>
  Â // source of the address. The target where the address will be written is<br>
  Â // SectionID/Offset in the relocation itself.<br>
-  DenseMap<unsigned, RelocationList> Relocations;<br>
+  std::unordered_map<unsigned, RelocationList> Relocations;<br>
<br>
  Â // Relocations to external symbols that are not yet resolved.  Symbols are<br>
  Â // external when they aren't found in the global symbol table of all loaded<br>
Index: lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp<br>
===================================================================<br>
--- lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp<br>
+++ lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp<br>
@@ -98,11 +98,11 @@<br>
  Â  Â // The Section here (Sections[i]) refers to the section in which the<br>
  Â  Â // symbol for the relocation is located.  The SectionID in the relocation<br>
  Â  Â // entry provides the section to which the relocation will be applied.<br>
-  Â  int Idx = it->getFirst();<br>
+  Â  int Idx = it->first;<br>
  Â  Â uint64_t Addr = Sections[Idx].LoadAddress;<br>
  Â  Â DEBUG(dbgs() << "Resolving relocations Section #" << Idx << "\t"<br>
  Â  Â  Â  Â  Â  Â  Â  Â  << format("%p", (uintptr_t)Addr) << "\n");<br>
-  Â  resolveRelocationList(it->getSecond(), Addr);<br>
+  Â  resolveRelocationList(it->second, Addr);<br>
  Â }<br>
  Â Relocations.clear();<br>
<br>
<br>
<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div>