29 Apr
2002
29 Apr
'02
1:34 p.m.
rzako23 wrote:
... In particular, Tilevich's solution uses non-intrusive multimaps to implement associations. While this solution is elegant and flexible, it results in sub-optimal performance compared to an intrusive solution of each object holding its own links to other objects. One of the design goals of the STL is to provide generic code that is close enough in efficiency to handcrafted code that there is rarely a need to handcraft code.
I liked the non-intrusive feature. Perhaps better performance could be achieved by replacing the multimaps with sorted vectors following Scott Meyers' advice in Item 23 of this book "Effective STL". -- Paul M. Dubuc