[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/11] libports: use a single hash table

From: Samuel Thibault
Subject: Re: [PATCH 02/11] libports: use a single hash table
Date: Tue, 13 May 2014 01:00:30 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Justus Winter, le Mon 12 May 2014 12:05:40 +0200, a écrit :
> Previously, libports used a hash table per port bucket.  This makes
> looking up a port difficult if one does not know the port bucket, as
> one has to iterate over all buckets and do a hash table lookup each.

But conversely, this makes having to iterate over all ports while one
may want to just iterate over one bucket.  I'd rather not drop that

_ports_bucket_class_iterate is clearly bogus ATM, so we at least need
something.  Would it be too costly to maintain both a global and a
per-bucket hash table?  It would at the very worse be only twice as
expensive as only the global hash table, while still allowing the
performance gain of iterating over only one bucket.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]