|
From: | Mikael Hakman |
Subject: | Re: [Partysip-dev] Hashing for finding transactions |
Date: | Fri, 28 Jan 2005 17:40:33 +0100 |
Aymeric,
On Friday, January 28, 2005 12:58 PM, Rohit
Mutsuddi wrtote:
> I've been using the partysip proxy for some
time now. I feel the osip_transaction_find can be made more efficient by
implementing a hash instead of going through the lists in order to match the
transaction.
> Has anyone implemented such a hash for this
yet and what are your thoughts on this. Will this ensure improved performance or
are there other overheads that might come in.
I do not know much about osip but generally hash
table lookup will be more efficient than sequential lookup when there are enough
entries to search. The exact break-even will depend on chosen hash function,
width of hash, and size of hash table. The next question could be how many
percent of time does osip spend in searching for transactions as compared to
other processing. If it uses 1% for searching sequentially and 99% for other
tasks then there wouldnt be any significant gain however efficient you could
make the search.
I would say that with hundreds or more of
transactions to search there should be a reason to look closer at the problem.
With 10 transactions I wouldnt bother.
Regards/Mikael
|
[Prev in Thread] | Current Thread | [Next in Thread] |