[PATCH] D18330: [ELF/AArch64] Implemented set of R_AARCH64_TLSDESC_* relocations.
Ed Maste via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 28 06:46:35 PDT 2016
emaste added inline comments.
================
Comment at: ELF/OutputSections.cpp:322
@@ +321,3 @@
+ // Tail here is amount of such special relocations.
+ Relocs.insert(Relocs.end() - Tail, Reloc);
+}
----------------
I tried a simple experiment with std::vector<int> to get a sense of the scale of the difference. One case started with 10 elements and then added 13 million more with `v.insert(v.end() - 10 , i)` while the other case maintained two vectors and concatenated them at the end. I took the 13 million number from the relocation count in @ruiu's note on linking debug Chrome.
The insert approach takes about 200 times as long in this test. Times in ms:
```
x concat.txt
+ insert.txt
+------------------------------------------------------------------------------+
|x ++++ +|
|A |_MA_| |
+------------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 5 2 5 4 4 1.2247449
+ 5 770 840 800 802 25.884358
Difference at 95.0% confidence
798 +/- 26.7237
19950% +/- 668.094%
(Student's t, pooled s = 18.3235)
```
Something like @zatrazz's suggestion above sounds reasonable to me, although I'd be happy enough to have a functional version committed first and the change made in a subsequent commit.
http://reviews.llvm.org/D18330
More information about the llvm-commits
mailing list