[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance of NS



>> - optimizes the bottleneck somehow.  For example, I believe
>>   "set" and "instvar" are the most common calls.  Is there a
>>   way to speed these up (like by-passing the lookup) ?
>
>We tried to eliminate some of the bottlenecks, such as using delay bind
>for mirrored variables.  John and Park are following up on this, I
>think.  

ns-2.1b6 has optimizations involving binding that should significantly
improve memory usage of simulations that use lots of TCP connections.
The changes won't improve CPU consumption, though.

In general, our approach is to keep Tcl code restricted to setup code
so that it shouldn't affect run-time performance much.  This guideline
isn't always perfectly followed, though (because of prototyping, or
because things change).

>> - can some of the otcl code be moved into C++  space ?
>>   For example, Node::add-route is called O(n^2) time
>>   in Simulator::compute-flat-route, and is a major bottleneck
>>   in start-up time.
>
>Yes.  Node::add-route is to setup cache entries in the node classifier
>after all routes are computed after computer-flat-route.
>...

The O(n^2) route setup is a known problem.  We would like to fix it as
you suggest (moving route setup into C++).  This is on the to do list
(one of MANY things, unfortunately).

As Haobo said, we're very happy to take patches from people that
improve performance (assuming they don't break things :-).

   -John Heidemann