[PATCH] WinCOFFObjectWriter: optimize the string table for common suffices

Hans Wennborg hans at chromium.org
Mon Sep 29 15:53:07 PDT 2014


================
Comment at: lib/MC/StringTableBuilder.cpp:31
@@ -29,2 +30,3 @@
+void StringTableBuilder::finalize(Kind kind) {
   SmallVector<StringRef, 8> Strings;
   for (auto i = StringIndexMap.begin(), e = StringIndexMap.end(); i != e; ++i)
----------------
majnemer wrote:
> Can we reserve space for `StringIndexMap.size()` number of `StringRef`s?
Done.

http://reviews.llvm.org/D5530






More information about the llvm-commits mailing list