Tim Armstrong has posted comments on this change.

Change subject: IMPALA-4752: make ObjectPool more efficient
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/5666/2/be/src/common/object-pool.h
File be/src/common/object-pool.h:

Line 43:     Element elem{t, [](void* obj){ delete reinterpret_cast<T*>(obj); 
}};
> Will the compiler elide the extra copy of the push back here? Or would it m
It should be able to optimise this fine, since it's a plain struct and it just 
needs to copy the two fields.

I wanted to use emplace_back() for brevity but I couldn't get it to work 
without defining an explicit constructor. Looks like i was missing the trick to 
get it to work with the braced initialisation syntax:
http://stackoverflow.com/questions/13812703/c11-emplace-back-on-vectorstruct


-- 
To view, visit http://gerrit.cloudera.org:8080/5666
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1e6a40ac798fa64da4767f530c48710cba623ea5
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Lars Volker <[email protected]>
Gerrit-Reviewer: Thomas Tauber-Marshall <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to