Re: [PATCH 4/5] libihash: optimize lookup-or-insert operations

2014-05-20 Thread Samuel Thibault
Justus Winter, le Thu 15 May 2014 23:10:50 +0200, a écrit : > If libihash is used to implement a cache, a insertion is always > preceeded by a lookup. hurd_ihash_add has to do the lookup again. > > Provide a new pair of functions, hurd_ihash_locp_add and > hurd_ihash_locp_find, that can be used i

[PATCH 4/5] libihash: optimize lookup-or-insert operations

2014-05-15 Thread Justus Winter
If libihash is used to implement a cache, a insertion is always preceeded by a lookup. hurd_ihash_add has to do the lookup again. Provide a new pair of functions, hurd_ihash_locp_add and hurd_ihash_locp_find, that can be used in combination to avoid the second lookup. * libihash/ihash.c (hurd_ih