[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
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
- Re: [PATCH 03/11] include: add lock-less reference counting primitives, (continued)
[PATCH 06/11] libtrivfs: lock-less reference counting for trivfs_peropen objects, Justus Winter, 2014/05/12
[PATCH 02/11] libports: use a single hash table, Justus Winter, 2014/05/12
- Re: [PATCH 02/11] libports: use a single hash table,
Samuel Thibault <=
[PATCH 04/11] libports: lock-less reference counting for port_info objects, Justus Winter, 2014/05/12
[PATCH 08/11] libihash: reduce the default maximum load factor to 75%, Justus Winter, 2014/05/12