[Asterisk-Dev] Profiling results: Asterisk processing 5000
concurrent IAX registrations
steve at daviesfam.org
steve at daviesfam.org
Mon Oct 31 09:32:42 MST 2005
On Mon, 31 Oct 2005, Steve Kann wrote:
> Kevin P. Fleming wrote:
>
> > steve at daviesfam.org wrote:
> >
> >> In this example, looks like we'd probably score significantly by
> >> down/upshifting peer names or whatever and then using a standard
> >> str(n)cmp rather than strcasecmp.
> >
> >
> > There are actually many places in Asterisk where that sort of thing
> > will be beneficial, and I've done quite a bit of work in that area for
> > post-1.2 merging... the same is true in the dialplan, only there the
> > problem is even worse due to the multiple searches that happen for
> > each step.
>
>
> Would it make a big difference to just use strcmp instead of strcasecmp?
> My guess is that it would improve things by at most 25% or so, but
> probably less (like 10%). That's just my gut, though..
>
> Obviously, you need to move from a linear search over all the peers
> O(n), which is does n times (so the whole registration system is
> O(n^2)), to some kind of indexed search..
Yeah - agreed. Kevin was talking at some point at Astricon (missed you,
BTW) about new structures for all the many lists in Asterisk.
I'm happy to work on that, but I got the impression something was in the
works already.
I'd expect strcmp to be a lot faster that strcasecmp. by the way, because
there are the special and fast "rep cmp" type instructions on the 80x86.
Steve
More information about the asterisk-dev
mailing list