[Ns-developers] A Reason for Slowness of NS3

Gustavo Carneiro gjcarneiro at gmail.com
Sun Feb 15 02:51:39 PST 2009


2009/2/15 Mathieu Lacage <mathieu.lacage at sophia.inria.fr>
[...]

> Now, to get back to the real issue, I would try to investigate why
> GetTypeId is called so often instead of blindly modifying the code. In
> that case, although I did not profile the code, I would bet that this
> function is called from Object::GetObject and that function is called
> from the ipv4 stack not caching the output of GetObject.
>
> Object::GetObject is a linear search within the list of aggregated
> objects. As such, using it from a performance sensitive code path does
> not make much sense. i.e., I would bet that if you bothered with caching
> the output of GetObject from within the ipv4 stack, you would get much
> better micro-benchmark results than what you have now. Of course, that
> would mean increasing your memory footprint to cache the pointer values
> so, again, is it going to be worth the change ? Only the ipv4
> maintainers can say so :)


I have to agree with this.  If there exists _any place_ where GetObject is
called in a code path that processes individual packets, for every packet, I
would consider it a bug that needs to be fixed.

-- 
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert


More information about the Ns-developers mailing list