Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2003-04-17 10:32:23

On Thursday 17 April 2003 10:04 am, Vladimir Prus wrote:
> Douglas Gregor wrote:
> > The efficiency won't be any worse than using a bind object elsewhere in a
> > program. The do_on_XXX functions merely augment the visitor list of
> > dfs_visitor and return a new dfs_visitor object.
> This precisely what worries me -- bind might not be very efficient. I may
> be a overly concerned about efficiency at the moment --- recently wrote a
> graph algorithm in BGL which turned out to be 100 times slower that a
> simply-coded one :-( Not sure if this is BGL's fault or the problem with
> the algorithm, though.

Not to blame the victim, but in my experience the abstraction penalty doesn't
go above, say, 20x in the worst case, so it sounds like an algorithmic
problem to me. Granted, figuring out the actual complexity of a particular
instance of any BGL algorithm can be a nontrivial task: one property map with
non-constant access time can sink the whole thing.


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