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
feature.

_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.

Samuel

Reply via email to