Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: A patch with hashtable optimization, which doesn't work



On 18 maja 2017 at 12:15:29, Sebastian Gniazdowski (psprint@xxxxxxxxxxx) wrote:
> Hello,
> it is really simple to keep collision lists sorted. However, I get error about typeset  
> not being found. Debugged that typeset is inserted into builtintab. I am pretty exhausted,  
> maybe someone will have a revelation on this. Debugged that typeset is being searched  
> in:

Found it, missing return NULL here below, writing so that no one wastes time, will now test performance.

+    } else if ( cres > 0 ) {
+        /* Insert in front of the list, because first
+         * element, nodes[hashval], is larger, so new
+         * element has to be before it */
+        hn->next = hp;
+        ht->nodes[hashval] = hn;
+       if (++ht->ct >= ht->hsize * 2 && !ht->scan)
+           expandhashtable(ht);
+        return NULL;

--
Sebastian Gniazdowski
psprint /at/ zdharma.org



Messages sorted by: Reverse Date, Date, Thread, Author