Boost logo

Boost Users :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-11-23 02:27:32


Gustavo S?ffffe1nchez wrote:

> Hello, all
> We are doing a algorithm based on the graph boost library. Actually, it
> will be a Dinamic Link Library(dll). Our problem is when we execute it in
> console mode, it costs 12 seconds to finish, while it costs 120 seconds
> more or less when we are calling it as a DLL from Visual Basic. We have
> traced into the source code and found that is the dijkstra_shortest_paths
> function from the boost library which costs us 10 times more in the dll
> than the console mode. We call the dijkstra_shortest_paths like this:
> dijkstra_shortest_paths(g,s,predecessor_map(&p[0]).distance_map(&d[0]).
>
visitor(make_dijkstra_visitor(_buscaVia(g,on_finish_vertex(),vinfo,edge_comp,via,p)
> )));

To begin with, are you sure DLL and console app are compiled with the same
optimization settings. BGL is very template heavy, so 10x speed difference
due to optimization would not be surprising.

Another idea is to drop the use of visitor and check if performance diffence
is still there.

- Volodya


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