On Thu, Jul 20, 2006 at 11:32:00AM +1000, Carlo Sogono wrote:
> With regards to Benno's code:
> After trying raw mallocs and performing quite well, I think it might 
> have to do with the code. I have different versions of my software, 

ooh

Have you checked your hash function/performance?  How
many land in the sam bucket?  For really bad hash performance
a basic lookup could be almost linear.

> hashed linked lists, hashed binary trees, etc. With 87 million mallocs I 
> expect binary trees of a hash table with size 100,001 to have a 800 

Forgive my ignorance, what's a hashed linked list or binary tree
as compared to a normal linked list or binary tree?

> entries each. Testing the same code with 1 million mallocs with a hash 
> table of 1,001 still gives me good results (that's an average of about 
> 1000 per tree) at less than 5 minutes. I tried to insert 87 million to a 
> hash of 100,001 yesterday at 4pm and it wasn't finished at 9am today. I 
> think that's just way too slow. By the way i just use a simple for loop 
> and % hash size so all trees should have the same depth.
> 
> 87 million / 100,001 = 869 (4pm-9am still not complete)
> 1 million / 1,001 = 999 (by 5 mins)
> 
> I would attach my source but it contains proprietary code :/
> 
> Thanks in advance.
> 
> Carlo
_______________________________________________
coders mailing list
[email protected]
http://lists.slug.org.au/listinfo/coders

Reply via email to