|No such thing as a small change|
Re: Re: Shift, Pop, Unshift and Push with Impunity!by tilly (Archbishop)
|on Jan 05, 2001 at 15:50 UTC||Need Help??|
The following is a slight modification of your program. It (ab)uses the fact that Perl only checks whether to split buckets when you use a new bucket. It does not make any assumptions about Perl's hashing algorithm. It is therefore able to generate the special keys much more quickly than yours does.
Update: (Much later.) Perl changed when it splits buckets so this program no longer runs slowly. Furthermore Perl's hashing algorithm is now random, so Dominus' program no longer runs slowly. Shucks.