Boost logo

Boost :

From: Michael Marcin (mmarcin_at_[hidden])
Date: 2007-06-19 21:32:27


Michael Marcin wrote:
>> Hi,
>>
>> I have a problem with my compiler (ARM's RVCT 2.2.1).
>> It is not generating optimal code for ptr_containers, specifically
>> I've been looking at ptr_vector.
>> I love using ptr_containers to convery ownership but I rely on them
>> being zero overhead over std::vector with explicit delete loops for
>> at least
>> simple operations like a for each loop.
>>
>> I would hope these 2 files (attached) would generate identical
>> assembly for the foo function but they are not even close (attached
>> as txt).
>>
>> I know there are a lot of compilers that are a lot smarter than this
>> one. Unfortunately I'm stuck with this one so I need to teach this
>> compiler to generate better code (by modifying the ptr_container
>> library) or stop using ptr_containers (cry).
>>

It seems the attachments didn't go through to everyone (blame Outlook
Express).

I've uploaded them in a zip here:

http://www.mikemarcin.com/misc/ptr_container_abstraction.zip

Thanks,

Michael Marcin


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk