Boost logo

Boost Users :

Subject: [Boost-users] [BGL] grid_graph, vertex_index and shared_ptr
From: Sergey Mitsyn (svm_at_[hidden])
Date: 2012-06-20 10:53:47


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?

-- 
------------
Sergey Mitsyn.

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