Good point. We actually do have quite a lot of code that does copy everything from one step of computation to next one, for clarity and separation of concerns. We're not afraid to do it one more time if needed, i.e. translating all fundamental Vertices to some "VerticesWithID", and then back. It is a linear loop, typically dwarfed by the computations inside each step which cost >= O(n log n). The small downsides are : code bloat (boilerplate), memory usage which might grow up to ~2x, and a little cpu runtime spent if copying data.
On Monday, August 28, 2017 at 4:22:34 PM UTC+2, Egon wrote: > > > Is there a reason you are dragging all the data of the fundamental > data-structure around for this computation? > >> >>> -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.