[LLVMdev] [lld] [patch] Mach-O Performance fix

Jean-Daniel Dupas mailing at xenonium.com
Thu Nov 20 01:41:35 PST 2014


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>


More information about the llvm-dev mailing list