[PATCH] D46145: Use a buffer when allocating relocations

Rafael Avila de Espindola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 26 15:45:34 PDT 2018


espindola added a comment.

In https://reviews.llvm.org/D46145#1080172, @ruiu wrote:

> Does your code make this part of code faster? It reduces memory allocation but it does extra memcpy, so I'm wondering.


On my machine the difference is in the noise. Note that it is not a given that this has more copying. When the vector is resized there is a copy, and we should expect fewer resizes with the single buffer.


https://reviews.llvm.org/D46145





More information about the llvm-commits mailing list