in reply to Re: Re: hash collision DOS
in thread hash collision DOS
Deep recursion checks in the list traversal logic is exactly the solution that I thought was likely to slow things down. Perl spends a lot of its time doing hash lookups, and any overhead (eg having to use up an extra register to track how deep the list went) is likely to show performance problems.
But thinking about the issue, I am not sure that a clever person couldn't manage to add such a check in some way that didn't cause significant performance problems. I simply have not worked close enough to the metal enough to have a sense of that. If you could add the performance check, though, there is no reason that you couldn't just fall back into a more complex and robust data structure instead of a linked list. The immediate algorithmic overhead is paid for by the fact that you only use it when you really need it.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: hash collision DOS
by BrowserUk (Patriarch) on Jun 03, 2003 at 06:05 UTC | |
by tilly (Archbishop) on Jun 03, 2003 at 06:20 UTC | |
by ikegami (Patriarch) on Apr 27, 2006 at 16:54 UTC | |
by tilly (Archbishop) on May 08, 2006 at 06:32 UTC | |
by demerphq (Chancellor) on May 08, 2006 at 15:29 UTC | |
|