in reply to Re^2: elsif chain vs. dispatch
in thread elsif chain vs. dispatch
Note also that hash lookups are, worst case, Θ(N). There's always a chance that all hash keys map to the same value, resulting in a linear list that needs to be searched.
I recall that perls from 5.8.3 or so have code in place to watch out for this sort of degenerate case, and will rehash to prevent this from occurring.
• another intruder with the mooring in the heart of the Perl
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: elsif chain vs. dispatch
by almut (Canon) on Apr 27, 2009 at 20:59 UTC | |
Re^4: elsif chain vs. dispatch
by Marshall (Canon) on Apr 27, 2009 at 19:58 UTC | |
by ikegami (Patriarch) on Apr 27, 2009 at 20:34 UTC | |
by Marshall (Canon) on Apr 27, 2009 at 21:02 UTC | |
by ikegami (Patriarch) on Apr 27, 2009 at 21:16 UTC | |
by JavaFan (Canon) on Apr 27, 2009 at 22:40 UTC | |
by Marshall (Canon) on Apr 27, 2009 at 23:30 UTC | |
| |
by Marshall (Canon) on Apr 27, 2009 at 21:54 UTC | |
Re^4: elsif chain vs. dispatch
by ikegami (Patriarch) on Apr 27, 2009 at 20:05 UTC | |
Re^4: elsif chain vs. dispatch
by Marshall (Canon) on Apr 27, 2009 at 20:31 UTC |
In Section
Seekers of Perl Wisdom