Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-03-04 10:34:29

Hi Jeremy,

I'm just profiling some algorithm. I noticed that dijkstra_shortest_paths
takes about 30% more time when predecessors and distance are
stored in vector_property_map that I've just wrote. The only potential
problem is shared_ptr member in that class, and in fact, it's copy ctor is
responsible for most of the performance loss.

However, I don't think the property maps should be copied that much:
in my example, about 1400000 copies are made. The copies are
1. When calling the "relax" function (in graph/relax.hpp)
2. When calling the "down_heap" function (in pending/mutable_heap.hpp)

The first takes property_map by value. The second takes comparison object
by value (which stores property map). Both functions are internal. Can they
accept parameters by reference?

More general question: shouldn't all internal functions in BGL accept
parameters by reference?

- Volodya

Boost list run by bdawes at, gregod at, cpdaniel at, john at