Re: [RFC] Adding a real HashTable implementation to gnulib

2019-08-26 Thread Tim Rühsen
Hi Bruno, sorry for the delay. This somewhat dropped off the tip of my list, but lurks at the edge of my consciousness, coming up from time to time. On 12/5/18 12:43 AM, Bruno Haible wrote: > Hi Tim, > >> Currently we have >> - positive integer (N): resize by old value * N >> - negative integer

Re: [RFC] Adding a real HashTable implementation to gnulib

2019-01-04 Thread Florian Weimer
* Tim Rühsen: > But I still wonder why > > - nested functions need an executable stack (why does the code have to > be run on the stack ?) The static chain pointer needs to be passed to the nest function, but most ABIs only have a code pointer. So a trampoline is written to the stack which sets

Re: [RFC] Adding a real HashTable implementation to gnulib

2019-01-03 Thread Tim Rühsen
On 12/4/18 3:32 AM, Bruno Haible wrote: > Hi Tim, > >> We have 'hashmap' [1] in GNU Wget2. > > Things I like about the implementation: > > - Collision resolution through linked list (a robust algorithm). > > - Reasonably generic API. > > - The user-definable destructor functions. > > Th

Re: [RFC] Adding a real HashTable implementation to gnulib

2018-12-04 Thread Bruno Haible
Hi Tim, > Currently we have > - positive integer (N): resize by old value * N > - negative integer (N): resize by old value + (-N) It's currently the opposite: - positive integer (N): resize to old size + N - negative integer (N): resize to old size * (-N) > > - The ability to set a growth pol

[RFC] Adding a real HashTable implementation to gnulib

2018-12-04 Thread Tim Rühsen
Hi Bruno, thank you so much for taking a look :-) (sorry, unencrypted to the ML now) On 04.12.18 03:32, Bruno Haible wrote: > Hi Tim, > >> We have 'hashmap' [1] in GNU Wget2. > > Things I like about the implementation: > > - Collision resolution through linked list (a robust algorithm). >

Re: [RFC] Adding a real HashTable implementation to gnulib

2018-12-04 Thread Tim Rühsen
bin_yeG1YHEY1.bin Description: PGP/MIME version identification encrypted.asc Description: OpenPGP encrypted message

Re: [RFC] Adding a real HashTable implementation to gnulib

2018-12-03 Thread Bruno Haible
Hi Tim, > We have 'hashmap' [1] in GNU Wget2. Things I like about the implementation: - Collision resolution through linked list (a robust algorithm). - Reasonably generic API. - The user-definable destructor functions. Things that could be improved: - The ability to set a growth pol

Re: [RFC] Adding a real HashTable implementation to gnulib

2018-12-03 Thread Tim Rühsen
On 12/2/18 2:41 PM, Bruno Haible wrote: > Hi, > > Darshit Shah wrote: >> I recently tried to use the hash table implementation in gnulib which resides >> in the "hash" module. However, I quickly realised that the hash table in >> gnulib >> seems to be what is otherwise popularly known as a hash s

Re: [RFC] Adding a real HashTable implementation to gnulib

2018-12-02 Thread LRN
On 02.12.2018 16:41, Bruno Haible wrote: > Hi, > > Darshit Shah wrote: >> I recently tried to use the hash table implementation in gnulib which >> resides in the "hash" module. However, I quickly realised that the hash >> table in gnulib seems to be what is otherwise popularly known as a hash >> s

Re: [RFC] Adding a real HashTable implementation to gnulib

2018-12-02 Thread Bruno Haible
Hi, Darshit Shah wrote: > I recently tried to use the hash table implementation in gnulib which resides > in the "hash" module. However, I quickly realised that the hash table in > gnulib > seems to be what is otherwise popularly known as a hash set, i.e., it supports > storing and retrieving jus

Re: [RFC] Adding a real HashTable implementation to gnulib

2018-11-26 Thread Ben Pfaff
Much as I like the PSPP hmaps, it probably makes sense for any hash table implementation in gnulib to match the existing code. On Tue, Nov 27, 2018 at 02:02:17AM +0100, Darshit Shah wrote: > Here are the links to the sources in the GNU Wget tree: > > http://git.savannah.gnu.org/cgit/wget.git/tree

Re: [RFC] Adding a real HashTable implementation to gnulib

2018-11-26 Thread Darshit Shah
Here are the links to the sources in the GNU Wget tree: http://git.savannah.gnu.org/cgit/wget.git/tree/src/hash.h http://git.savannah.gnu.org/cgit/wget.git/tree/src/hash.c At first sight, the implementation in PSPP looks a lot more concise. Also, it's usage of fewer preprocessor statements makes

Re: [RFC] Adding a real HashTable implementation to gnulib

2018-11-26 Thread Ben Pfaff
On Tue, Nov 27, 2018 at 12:16:16AM +0100, Darshit Shah wrote: > I recently tried to use the hash table implementation in gnulib which resides > in the "hash" module. However, I quickly realised that the hash table in > gnulib > seems to be what is otherwise popularly known as a hash set, i.e., it

[RFC] Adding a real HashTable implementation to gnulib

2018-11-26 Thread Darshit Shah
I recently tried to use the hash table implementation in gnulib which resides in the "hash" module. However, I quickly realised that the hash table in gnulib seems to be what is otherwise popularly known as a hash set, i.e., it supports storing and retrieving just values from the structure. On th