Hello, While profiling lld, I found that lld spend more than 10% of the link time doing useless vector copy induced by used of ‘auto’ keyword. Here is a patch to avoid that copy by explicitly requiring a reference (auto&). The culprit was ‘auto vec = pos->second’ Maybe we should review other places where auto is used to make sure that kind of issue does not occurs. -- Jean-Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: nocopy.patch Type: application/octet-stream Size: 1112 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141120/b5ba57e6/attachment.obj>
Thanks! Committed in r222455 -Nick On Nov 20, 2014, at 1:41 AM, Jean-Daniel Dupas <mailing at xenonium.com> wrote:> Hello, > > While profiling lld, I found that lld spend more than 10% of the link time doing useless vector copy induced by used of ‘auto’ keyword. > > Here is a patch to avoid that copy by explicitly requiring a reference (auto&). The culprit was ‘auto vec = pos->second’ > > Maybe we should review other places where auto is used to make sure that kind of issue does not occurs. > > > -- Jean-Daniel > > > > <nocopy.patch>