[llvm-commits] [llvm] r148653 - in /llvm/trunk: include/llvm/Object/ObjectFile.h include/llvm/Support/Endian.h lib/Object/ELFObjectFile.cpp

Bendersky, Eli eli.bendersky at intel.com
Thu Jan 26 01:09:59 PST 2012


> > In light of the above, which use(s) of std::vector would you recommend
> replacing with SmallVector?
> >
> > Thanks in advance,
> > Eli
> >
> >
> >
> 
> Hi Eli,
> 
> That's pretty similar to what the MachO side of things is doing.
> SmallVector<Ty, 0> is nearly equivalent to std::vector, so even just using it to
> optimize for a set of common cases w/ not too many objects in it can be very
> handy, especially when the contained objects are small like they are here.
> 
> I wouldn't go so far to say that it's a requirement to use SmallVector<> here
> or anything like that, but it would be my personal choice barring seeing actual
> performance comparisons demonstrating otherwise.
> 

Hi Jim,

We plan to replace this code pretty soon with a more sophisticated memory manager, so the vector<uint8_t*> of addresses will go away in its current form. In the new implementation we're going to submit, we'll be aiming to use SmallVector instead of vector wherever it's reasonable, and feel free to comment on that in the patch review.
Does that sound acceptable?
Eli

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





More information about the llvm-commits mailing list