[Ns-bugs] [Bug 86] add missing functions to Mac48Address code
bugzilla-daemon at nsnam-www.ece.gatech.edu
Wed Oct 10 04:06:47 PDT 2007
------- Comment #4 from mathieu.lacage at sophia.inria.fr 2007-10-10 07:06 -------
> > you can make the non-member function be a friend of the class. But, clearly,
> > the goal was not performance here.
I will do the above to avoid the extra copy.
> I have no proof of this, but I think "operator <" is going to be performance
> sensitive because it is used by stl::map and stl::set, for example.
> I have another idea; why not make Mac48Address store a uint64_t internally?
If we ever get into a performance bottleneck, we will optimize the code and use
a uint64_t if it turns out to be really faster. However, until this happens,
let's not make the implementation unreadable.
> This way comparison could become very fast on 64 bit processors, and probably
> also even in 32 bit ones (compiler optimisation). That is assuming support for
> 64 bit integers is portable, of course (I have no idea).
We already decided that it was portable enough for us since we use it in a lot
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Ns-bugs