[llvm] r290685 - [NewGVN] replace emplace_back with push_back
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 28 13:09:46 PST 2016
On Wed, Dec 28, 2016 at 12:36 PM, Piotr Padlewski via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: prazek
> Date: Wed Dec 28 14:36:08 2016
> New Revision: 290685
>
> URL: http://llvm.org/viewvc/llvm-project?rev=290685&view=rev
> Log:
> [NewGVN] replace emplace_back with push_back
>
I'm somewhat against this change.
It would be nice to have coding guidelines here.
>
> emplace_back is not faster if it is equivalent to push_back. In this cases
> emplaced value had the
> same type that the one stored in container. It is ugly and it might be
> even slower (see
> Scott Meyers presentation about emplacement).
>
I'm going to disagree about "ugly", i don't think it's ugly or not ugly.
If it's really slower, i'd like to see numbers.
Otherwise, i think we should just be consistent if we can.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161228/5dcb3e04/attachment.html>
More information about the llvm-commits
mailing list