Boost logo

Boost Users :

Subject: Re: [Boost-users] Using Coroutines in the Visitor Pattern (use-case: BGL event visitor)
From: alex (alexhighviz_at_[hidden])
Date: 2016-01-15 12:46:38

>Nevertheless, I think it would be
>useful to compare running dijkstra_shortest_path as it currently is in BGL
>to your inverted control method. I.e. simple do: while(from_a()){}.
>This would tell us what cost is associated with inverting the control and
>make it easier to decide whether it is a pattern to use whenever it seems
>convenient or only when strictly necessary. (with my solution the cost of
>inversion is about 17% extra computation time)

I just tried it on a graph with 3 million nodes. With your solution and the
additional cost is 11%, so I would say it is superior on all accounts. I
just wish I knew this earlier.

reading bimba_6M.obj...
converting to boost graph type ...
plain boost dijkstra_shortest_path ...1712 ms
stackless coroutine algorithm (Alex)...2065 ms
boost coroutine visitor (Nat Goodspeed)...1890 ms

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at