[Ns-developers] A Reason for Slowness of NS3

Tom Henderson tomh at tomh.org
Sat Feb 14 08:34:12 PST 2009


Mathieu Lacage wrote:
> On Fri, 2009-02-13 at 14:58 -0500, Adrian Sai-Wah TAM wrote:
>> Hi,
>>
>> Recently I did some profiling with the NS3. I compile everything with
>> the optimized build and measure the time in my laptop computer running
>> Debian. Following is the result.
> 
> cool.
> 
>> $ time LD_LIBRARY_PATH=~/ns-3-dev/build/optimized ./csma-star
>> --SchedulerType=ns3::MapScheduler
>> real    0m2.805s
>> user    0m2.692s
>> sys     0m0.028s
>> $ time LD_LIBRARY_PATH=~/ns-3-dev/build/optimized ./csma-star
>> --SchedulerType=ns3::Ns2CalendarScheduler
>> real    0m2.863s
>> user    0m2.740s
>> sys     0m0.040s
> 
> It seems consistent with every other benchmark result I have seen.

Do you understand yet why Calendar is not doing better than Map in most 
(all?) of our scenarios?


- TypeId tid = GetTypeId();
+ const TypeId& tid = GetTypeId();

won't the copy in this case just be optimized away by compilers, making 
return by reference here unnecessary?  Does gcc optimize this case?

Tom



More information about the Ns-developers mailing list