Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] grid_graph, vertex_index and shared_ptr
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2012-06-20 12:38:05


On Wed, 20 Jun 2012, Sergey Mitsyn wrote:

> Hello,
>
> Recently I've found that the vertex_index property map of grid_graph holds a
> shared_ptr to a graph copy. Is there any reason for it?
>
> Actually, other classes which are tied with grid_graph holds it by plain
> pointer. Switching to it in grid_graph_index_map almost doubled the
> performance on some of my algorithms. Even copying the graph object by value
> (which actually holds 5 fields with 3 being small boost::array) still has
> better performance than using shared_ptr.
>
> Maybe it should be switched to plain pointer?

I've made that change on the trunk in r79017.

-- Jeremiah Willcock


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net