[Ns-developers] Don't recompute NodeList::End () at every loop in GlobalRouteManagerImpl
Mathieu Lacage
mathieu.lacage at sophia.inria.fr
Wed Aug 19 11:20:23 PDT 2009
On Wed, 2009-08-19 at 16:23 +0200, Guillaume Seguin wrote:
> > I don't think the listEnd variable in your patch causes any Node reference
> > count to increase, unless I miss something.
> >
>
>
> Hmm yeah this sounds right. After checking the code again, most likely those
> Unrefs were coming from the NodeListPriv object, which is ref'd and unref'd in
> NodeList::End () I believe.
ha, good catch: that is the root of the problem most likely.
> > I still wish NodeList::End could be effectively inlined so that we would be
> > speeding up not only global routing but other code using NodeList as well.
> >
>
> Yeah, this might be a worthy gain, though the trip through the singleton getter
> might be expensive part.
I guess you could do something along the lines of:
- make End inline
- mark singleton get functions inline
- make get function return a const & Ptr<T> or a raw pointer
(I did not look at the code to check if this makes sense at all)
Mathieu
More information about the Ns-developers
mailing list