From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-04-17 09:04:24
Douglas Gregor wrote:
> On Thursday 17 April 2003 03:50 am, Vladimir Prus wrote:
> > IOW, now specifying behaviour for event requires creating a new class,
> > with "event_filter" typedef and operator(). You propose to pass lambda,
> > immediately on dfs_visitor creation. I think this is indeed convenient.
> > I've some concerns about efficiency, but why don't try?
> It's a little worse than just creating the new class with event_filter: you
> need to build up a cons-list out of std::pairs containing your visitor
Yep, but that's the easy part of the game, IMO.
> 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,
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk