I think the hash lookup should not modify the hash list. Its quite expensive to relink it on every lookup and definitely negates any intended speedup.
Interestingly, that code seems to go back all the way to the first pike commit from ulpc.
Arne
On Fri, 30 May 2014, Chris Angelico wrote:
gcc on Linux is warning of an assignment that removes 'const', in a situation where the function's argument is const and the function then mutates via a local pointer. Removing 'const' from the argument silences the warning and makes it clear that the argument may be changed; or if that's not true, a more explicit cast could be done, so the compiler knows that part of it is constant and part isn't. Attached patch removes 'const'.
ChrisA