Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-06-20 05:13:09


Michael Marcin skrev:
> 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).

Hi Michael,

Some compilers have a problem doing near-perfect inlining,
which can be a real killer.

I'll try to investigate this.

-Thorsten


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