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

Jim Grosbach grosbach at apple.com
Thu Jan 26 07:32:51 PST 2012


On Jan 26, 2012, at 1:09 AM, Bendersky, Eli wrote:

>>> 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?

Sure, that sounds great. I look forward to seeing the new implementation.

-Jim

> 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