you were talking about insuficient use of hashtables :/, and thought id point it out.
Quote:

Var %a = 1
while ($hfind(HashTable,*wildcard*,%a,w)) {
;Do stuff here
inc %a
}

Var %a = 1
while ($hget(HashTable,%a).item) {
var %item = $v1
if (*wildcard* iswm %item) {
;Do stuff here
}
inc %a
}
Although the first loop looks much neater and exploits the $hfind identifier to find you all the matching items, it will still take about twice as much time to resolve.

That happens because the $hfind identifier tries each time to find the next matching item, but it starts each time from the beginning of the Hash table. So if you have a lot of items that match the wildcard it will go over the the entire Hash table over and over.

But the second loop will just go over the Hash table once, and find all the matches.



i shall shut up now.


$maybe