www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - repost: codegen issues with -inline

reply "Kris" <someidiot earthlink.dot.dot.dot.net> writes:
(Repost, so it doesn't get lost)

[Here's a binary-chop with an interesting codegen issue. It operates fine
with any compiler flags other than -inline which, when applied, will cause
an access violation.

Compiler flags for the code listing are -g -O -release -inline]

Here's the code:

        private static int bsearch (short[] array, short match)
        {
                int l, u, m;

                l = -1;
                u = array.length;

                while (l+1 != u)
                      {
                      m = (l + u) / 2;
                      if (array[m] < match)
                          l = m;
                      else
                         u = m;
                      }

               if (u >= array.length || array[u] != match)
                   return -u;
               return u;
        }

        static int lookup (short target)
        {
                short index = bsearch (primes, target);
                if (index < 0)
                    index = -index;

                if (index >= primes.length)
                    index = primes.length - 1;

                return primes[index];
        }

The caller looks like this:

        this (FileBucket bucket, int capacity)
        {
                super (Primes.lookup (capacity));
                <snip>
        }
Taking a closer look, the -inline is inlining an instance of the lookup()
method, but passing invalid arguments to the bsearch() method.

GPFs caused by bogus codegen aside, the lookup() method is a seriously poor
candidate for inlining. Perhaps D needs to expose more control over such
things?

- Kris
May 24 2004
parent reply "Walter" <newshound digitalmars.com> writes:
Can you make a fully compilable example, please? The reasons are:
1) frequently the real problem is in the stuff snipped out.
2) it's a fair amount of work to invent the boilerplate needed to compile
it. If you already have it, please leave it in - and I hate doing this only
to find out that (1) was the problem.
3) when done, it makes for a nice addition to the tests I run D through for
every release.
May 25 2004
parent reply "Kris" <someidiot earthlink.dot.dot.dot.net> writes:
Sure Walter; just download the Mango tree from dsource.org :-)

Seriously though; I'm vaguely concerned that some shortening will cause
your -inline algorithm to change strategy. Will give it a shot tomorrow, and
send you the resulting code.

BTW, how sensitive are your D hash algorithms to prime numbers? Nada? Some?
Seriously so?

- Kris



"Walter" <newshound digitalmars.com> wrote in message
news:c8uup3$303e$1 digitaldaemon.com...
 Can you make a fully compilable example, please? The reasons are:
 1) frequently the real problem is in the stuff snipped out.
 2) it's a fair amount of work to invent the boilerplate needed to compile
 it. If you already have it, please leave it in - and I hate doing this
only
 to find out that (1) was the problem.
 3) when done, it makes for a nice addition to the tests I run D through
for
 every release.
May 25 2004
next sibling parent reply "Kris" <someidiot earthlink.dot.dot.dot.net> writes:
Here you go Walter:

dmd -O -release -inline primes.d inlineBug.d

(see attached files)

 "Walter" <newshound digitalmars.com> wrote
 Can you make a fully compilable example, please?
begin 666 inlineBug.d M:6UP;W)T('!R:6UE<SL-" T*8VQA<W, 1F]O#0I[#0H)=&AI<R H*0T*"7L- M" D)4')I;65S+FQO;VMU<" R*3L)#0H)?0T*?0T*#0H-"G9O:60 ;6%I;B I 7#0I[#0H);F5W($9O;R I.PT*?0T*#0H` ` end begin 666 primes.d M+RHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BH-" T*(" (" M("! 9FEL92!0<FEM97,N9 T*(" (" (" -"B (" (" 0V]P>7)I9VAT M("A#*2 R,# T($MR:7, 0F5L; T*(" (" (" -"B (" (" 5&AI<R!S M;V9T=V%R92!I<R!P<F]V:61E9" G87,M:7,G+"!W:71H;W5T(&%N>2!E>'!R M97-S(&]R(&EM<&QI960-"B (" (" =V%R<F%N='DN($EN(&YO(&5V96YT M('=I;&P =&AE(&%U=&AO<G, 8F4 :&5L9"!L:6%B;&4 9F]R(&1A;6%G97,- M"B (" (" ;V8 86YY(&MI;F0 87)I<VEN9R!F<F]M('1H92!U<V4 ;V8 M=&AI<R!S;V9T=V%R92X-"B (" (" #0H (" (" (%!E<FUI<W-I;VX M:7, :&5R96)Y(&=R86YT960 =&\ 86YY;VYE('1O('5S92!T:&ES('-O9G1W M87)E(&9O<B!A;GD #0H (" (" ('!U<G!O<V4L(&EN8VQU9&EN9R!C;VUM M97)C:6%L(&%P<&QI8V%T:6]N<RP 86YD('1O(&%L=&5R(&ET(&%N9"]O<B - M"B (" (" <F5D:7-T<FEB=71E(&ET(&9R965L>2P <W5B:F5C="!T;R!T M:&4 9F]L;&]W:6YG(')E<W1R:6-T:6]N<SH-"B (" (" #0H (" (" M(#$N(%1H92!O<FEG:6X ;V8 =&AI<R!S;V9T=V%R92!M=7-T(&YO="!B92!M M:7-R97!R97-E;G1E9#L >6]U(&UU<W0 #0H (" (" (" (&YO="!C;&%I M;2!T:&%T('EO=2!W<F]T92!T:&4 ;W)I9VEN86P <V]F='=A<F4N($EF('EO M=2!U<V4 =&AI<R -"B (" (" (" <V]F='=A<F4 :6X 82!P<F]D=6-T M+"!A;B!A8VMN;W=L961G;65N="!W:71H:6X 9&]C=6UE;G1A=&EO;B!O9B - M"B (" (" (" <V%I9"!P<F]D=6-T('=O=6QD(&)E(&%P<')E8VEA=&5D M(&)U="!I<R!N;W0 <F5Q=6ER960N#0H-"B (" (" ,BX 06QT97)E9"!S M;W5R8V4 =F5R<VEO;G, ;75S="!B92!P;&%I;FQY(&UA<FME9"!A<R!S=6-H M+"!A;F0 ;75S=" -"B (" (" (" ;F]T(&)E(&UI<W)E<')E<V5N=&5D M(&%S(&)E:6YG('1H92!O<FEG:6YA;"!S;V9T=V%R92X-" T*(" (" (" S M+B!4:&ES(&YO=&EC92!M87D ;F]T(&)E(')E;6]V960 ;W( 86QT97)E9"!F M<F]M(&%N>2!D:7-T<FEB=71I;VX-"B (" (" (" ;V8 =&AE('-O=7)C M92X-" T*#0H (" (" (" (" (" (" (" ("!^?GY^?GY^?GY^?GY^ M?GY^?GY^?GY^?GY^?GY^?GX-" T*(" (" (" -"B (" (" 0'9E<G-I M;VX (" (" ($EN:71I86P =F5R<VEO;BP 07!R:6P ,C P-" (" ( T* M(" (" ("! 875T:&]R(" (" (" 2W)I<PT*#0H-"BHJ*BHJ*BHJ*BHJ M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHO#0H-"FUO9'5L92!P<FEM97,[#0H- M"F-L87-S(%!R:6UE<PT*>PT*(" (" ("!P<FEV871E('-T871I8R!C;VYS M="!S:&]R="!P<FEM97-;72 ]#0H (" (" (%L-"B (" (" (" ,BP M(" ,RP (" -2P (" -RP (" Q,2P (" Q,RP (" Q-RP (" Q.2P (" R M,RP (" R.2P-"B (" (" (" S,2P (" S-RP (" T,2P (" T,RP (" T M-RP (" U,RP (" U.2P (" V,2P (" V-RP (" W,2P-"B (" (" (" W M,RP (" W.2P (" X,RP (" X.2P (" Y-RP (#$P,2P (#$P,RP (#$P-RP M(#$P.2P (#$Q,RP-"B (" (" (#$R-RP (#$S,2P (#$S-RP (#$S.2P M(#$T.2P (#$U,2P (#$U-RP (#$V,RP (#$V-RP (#$W,RP-"B (" (" M(#$W.2P (#$X,2P (#$Y,2P (#$Y,RP (#$Y-RP (#$Y.2P (#(Q,2P (#(R M,RP (#(R-RP (#(R.2P-"B (" (" (#(S,RP (#(S.2P (#(T,2P (#(U M,2P (#(U-RP (#(V,RP (#(V.2P (#(W,2P (#(W-RP (#(X,2P-"B (" M(" (#(X,RP (#(Y,RP (#,P-RP (#,Q,2P (#,Q,RP (#,Q-RP (#,S,2P M(#,S-RP (#,T-RP (#,T.2P-"B (" (" (#,U,RP (#,U.2P (#,V-RP M(#,W,RP (#,W.2P (#,X,RP (#,X.2P (#,Y-RP (#0P,2P (#0P.2P-"B M(" (" (#0Q.2P (#0R,2P (#0S,2P (#0S,RP (#0S.2P (#0T,RP (#0T M.2P (#0U-RP (#0V,2P (#0V,RP-"B (" (" (#0V-RP (#0W.2P (#0X M-RP (#0Y,2P (#0Y.2P (#4P,RP (#4P.2P (#4R,2P (#4R,RP (#4T,2P- M"B (" (" (#4T-RP (#4U-RP (#4V,RP (#4V.2P (#4W,2P (#4W-RP M(#4X-RP (#4Y,RP (#4Y.2P (#8P,2P-"B (" (" (#8P-RP (#8Q,RP M(#8Q-RP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#,T.2P -#,U-RP M-#,V,RP -#,W,RP -#,Y,2P -#,Y-RP -#0P.2P-"B (" (" -#0R,2P M-#0R,RP -#0T,2P -#0T-RP -#0U,2P -#0U-RP -#0V,RP -#0X,2P -#0X M,RP -#0Y,RP-"B (" (" -#4P-RP -#4Q,RP -#4Q-RP -#4Q.2P -#4R M,RP -#4T-RP -#4T.2P -#4V,2P -#4V-RP -#4X,RP-"B (" (" -#4Y M,2P -#4Y-RP -#8P,RP -#8R,2P -#8S-RP -#8S.2P -#8T,RP -#8T.2P M-#8U,2P -#8U-RP-"B (" (" -#8V,RP -#8W,RP -#8W.2P -#8Y,2P M-#<P,RP -#<R,2P -#<R,RP -#<R.2P -#<S,RP -#<U,2P-"B (" (" M-#<U.2P -#<X,RP -#<X-RP -#<X.2P -#<Y,RP -#<Y.2P -# P,2P -# Q M,RP -# Q-RP -# S,2P-"B (" (" -# V,2P -# W,2P -# W-RP -# X M.2P -#DP,RP -#DP.2P -#DQ.2P -#DS,2P -#DS,RP -#DS-RP-"B (" M(" -#DT,RP -#DU,2P -#DU-RP -#DV-RP -#DV.2P -#DW,RP -#DX-RP M-#DY,RP -#DY.2P -3 P,RP-"B (" (" -3 P.2P -3 Q,2P -3 R,2P M-3 R,RP -3 S.2P -3 U,2P -3 U.2P -3 W-RP -3 X,2P -3 X-RP-"B M(" (" -3 Y.2P -3$P,2P -3$P-RP -3$Q,RP -3$Q.2P -3$T-RP -3$U M,RP -3$V-RP -3$W,2P -3$W.2P-"B (" (" -3$X.2P -3$Y-RP -3(P M.2P -3(R-RP -3(S,2P -3(S,RP -3(S-RP -3(V,2P -3(W,RP -3(W.2P- M"B (" (" -3(X,2P -3(Y-RP -3,P,RP -3,P.2P -3,R,RP -3,S,RP M-3,T-RP -3,U,2P -3,X,2P -3,X-RP-"B (" (" -3,Y,RP -3,Y.2P M-30P-RP -30Q,RP -30Q-RP -30Q.2P -30S,2P -30S-RP -30T,2P -30T M,RP-"B (" (" -30T.2P -30W,2P -30W-RP -30W.2P -30X,RP -34P M,2P -34P,RP -34P-RP -34Q.2P -34R,2P-"B (" (" -34R-RP -34S M,2P -34U-RP -34V,RP -34V.2P -34W,RP -34X,2P -34Y,2P -38R,RP M-38S.2P-"B (" (" -38T,2P -38T-RP -38U,2P -38U,RP -38U-RP M-38U.2P -38V.2P -38X,RP -38X.2P -38Y,RP-"B (" (" -3<P,2P M-3<Q,2P -3<Q-RP -3<S-RP -3<T,2P -3<T,RP -3<T.2P -3<W.2P -3<X M,RP -3<Y,2P-"B (" (" -3 P,2P -3 P-RP -3 Q,RP -3 R,2P -3 R M-RP -3 S.2P -3 T,RP -3 T.2P -3 U,2P -3 U-RP-"B (" (" -3 V M,2P -3 V-RP -3 V.2P -3 W.2P -3 X,2P -3 Y-RP -3DP,RP -3DR,RP M-3DR-RP -3DS.2P-"B (" (" -3DU,RP -3DX,2P -3DX-RP -C P-RP M-C Q,2P -C R.2P -C S-RP -C T,RP -C T-RP -C U,RP-"B (" (" M-C V-RP -C W,RP -C W.2P -C X.2P -C Y,2P -C$P,2P -C$Q,RP -C$R M,2P -C$S,2P -C$S,RP-"B (" (" -C$T,RP -C$U,2P -C$V,RP -C$W M,RP -C$Y-RP -C$Y.2P -C(P,RP -C(Q,2P -C(Q-RP -C(R,2P-"B (" M(" -C(R.2P -C(T-RP -C(U-RP -C(V,RP -C(V.2P -C(W,2P -C(W-RP M-C(X-RP -C(Y.2P -C,P,2P-"B (" (" -C,Q,2P -C,Q-RP -C,R,RP M-C,R.2P -C,S-RP -C,T,RP -C,U,RP -C,U.2P -C,V,2P -C,V-RP-"B M(" (" -C,W,RP -C,W.2P -C,X.2P -C,Y-RP -C0R,2P -C0R-RP -C0T M.2P -C0U,2P -C0V.2P -C0W,RP-"B (" (" -C0X,2P -C0Y,2P -C4R M,2P -C4R.2P -C4T-RP -C4U,2P -C4U,RP -C4V,RP -C4V.2P -C4W,2P- M"B (" (" -C4W-RP -C4X,2P -C4Y.2P -C8P-RP -C8Q.2P -C8S-RP M-C8U,RP -C8U.2P -C8V,2P -C8W,RP-"B (" (" -C8W.2P -C8X.2P M-C8Y,2P -C<P,2P -C<P,RP -C<P.2P -C<Q.2P -C<S,RP -C<S-RP -C<V M,2P-"B (" (" -C<V,RP -C<W.2P -C<X,2P -C<Y,2P -C<Y,RP -C P M,RP -C R,RP -C R-RP -C R.2P -C S,RP-"B (" (" -C T,2P -C U M-RP -C V,RP -C V.2P -C W,2P -C X,RP -C Y.2P -CDP-RP -CDQ,2P M-CDQ-RP-"B (" (" -CDT-RP -CDT.2P -CDU.2P -CDV,2P -CDV-RP M-CDW,2P -CDW-RP -CDX,RP -CDY,2P -CDY-RP-"B (" (" -S P,2P M-S Q,RP -S Q.2P -S R-RP -S S.2P -S T,RP -S U-RP -S V.2P -S W M.2P -S$P,RP-"B (" (" -S$P.2P -S$R,2P -S$R-RP -S$R.2P -S$U M,2P -S$U.2P -S$W-RP -S$X-RP -S$Y,RP -S(P-RP-"B (" (" -S(Q M,2P -S(Q,RP -S(Q.2P -S(R.2P -S(S-RP -S(T,RP -S(T-RP -S(U,RP M-S(X,RP -S(Y-RP-"B (" (" -S,P-RP -S,P.2P -S,R,2P -S,S,2P M-S,S,RP -S,T.2P -S,U,2P -S,V.2P -S,Y,RP -S0Q,2P-"B (" (" M-S0Q-RP -S0S,RP -S0U,2P -S0U-RP -S0U.2P -S0W-RP -S0X,2P -S0X M-RP -S0X.2P -S0Y.2P-"B (" (" -S4P-RP -S4Q-RP -S4R,RP -S4R M.2P -S4S-RP -S4T,2P -S4T-RP -S4T.2P -S4U.2P -S4V,2P-"B (" M(" -S4W,RP -S4W-RP -S4X,RP -S4X.2P -S4Y,2P -S8P,RP -S8P-RP M-S8R,2P -S8S.2P -S8T,RP-"B (" (" -S8T.2P -S8V.2P -S8W,RP M-S8X,2P -S8X-RP -S8Y,2P -S8Y.2P -S<P,RP -S<Q-RP -S<R,RP-"B M(" (" -S<R-RP -S<T,2P -S<U,RP -S<U-RP -S<U.2P -S<X.2P -S<Y M,RP -S Q-RP -S R,RP -S R.2P-"B (" (" -S T,2P -S U,RP -S V M-RP -S W,RP -S W-RP -S W.2P -S X,RP -SDP,2P -SDP-RP -SDQ.0T* M(" (" ("!=.PT*#0H (" (" ("\J*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BH-" T*(" (" (" (" (" ($)I;F%R>2UC:&]P('-E87)C:"!O;B!S M;W)T960 9&%T82X-" T*(" (" (" J*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BHO#0H-"B (" (" <')I=F%T92!S=&%T:6, :6YT(&)S96%R8V *'-H M;W)T6UT 87)R87DL('-H;W)T(&UA=&-H*0T*(" (" ("![#0H (" (" M(" (" (" :6YT(&PL('4L(&T[#0H (" (" (" (" (" #0H (" M(" (" (" (" ;" ]("TQ.PT*(" (" (" (" (" ('4 /2!A<G)A M>2YL96YG=& [#0H-"B (" (" (" (" ("!W:&EL92 H;"LQ("$]('4I M( T*(" (" (" (" (" (" (" ('L-"B (" (" (" (" (" M(" ("!M(#T *&P *R!U*2 O(#([#0H (" (" (" (" (" (" (" M:68 *&%R<F%Y6VU=(#P ;6%T8V I#0H (" (" (" (" (" (" (" M(" (&P /2!M.PT*(" (" (" (" (" (" (" (&5L<V4-"B (" M(" (" (" (" (" (" ("!U(#T ;3L-"B (" (" (" (" (" M(" ("!]#0H-"B (" (" (" (" (&EF("AU(#X](&%R<F%Y+FQE;F=T M:"!\?"!A<G)A>5MU72 A/2!M871C:"D-"B (" (" (" (" (" ("!R M971U<FX +74[#0H (" (" (" (" ("!R971U<FX =3L-"B (" (" M?0T*#0H (" (" ("\J*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ#0H-"B M(" (" (" (" ("!R971U<FX 82!P<FEM92!N=6UB97( 8F5T=V5E;B R M(&%N9" W.3$Y("AI;F-L=7-I=F4I('1H870-"B (" (" (" (" ("!I M<R!E<75A;"!T;R!O<B!L87)G97( =&AA;B!T:&4 9VEV96X )W1A<F=E="< M;G5M8F5R+B -" T*(" (" (" J*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M+PT*#0H (" (" ('-T871I8R!I;G0 ;&]O:W5P("AS:&]R="!T87)G970I M#0H (" (" ('L-"B (" (" (" (" ("!S:&]R="!I;F1E>" ](&)S M96%R8V *'!R:6UE<RP =&%R9V5T*3L-"B (" (" (" (" ("!I9B H M:6YD97 /" P*0T*(" (" (" (" (" (" ("!I;F1E>" ]("UI;F1E M>#L-" T*(" (" (" (" (" (&EF("AI;F1E>" ^/2!P<FEM97,N;&5N M9W1H*0T*(" (" (" (" (" (" ("!I;F1E>" ]('!R:6UE<RYL96YG M=& +2 Q.PT*#0H (" (" (" (" (" <F5T=7)N('!R:6UE<UMI;F1E 3>%T[#0H (" (" ('T-"GT-" `` ` end
May 25 2004
parent "Walter" <newshound digitalmars.com> writes:
Thanks. It'll get fixed in the next update.

"Kris" <someidiot earthlink.dot.dot.dot.net> wrote in message
news:c90cmf$28r5$1 digitaldaemon.com...
 Here you go Walter:

 dmd -O -release -inline primes.d inlineBug.d

 (see attached files)

 "Walter" <newshound digitalmars.com> wrote
 Can you make a fully compilable example, please?
May 27 2004
prev sibling parent reply "Walter" <newshound digitalmars.com> writes:
"Kris" <someidiot earthlink.dot.dot.dot.net> wrote in message
news:c8v0mb$1ag$1 digitaldaemon.com...
 BTW, how sensitive are your D hash algorithms to prime numbers? Nada?
Some?
 Seriously so?
??
May 25 2004
parent reply "Kris" <someidiot earthlink.dot.dot.dot.net> writes:
I meant, does the .length of an associative array impact the performance of
the algorithms? Some hashing algorithms favour prime array-lengths ...

Am I completely off base here?

- Kris

"Walter" <newshound digitalmars.com> wrote in message
news:c9185v$gj6$1 digitaldaemon.com...
 "Kris" <someidiot earthlink.dot.dot.dot.net> wrote in message
 news:c8v0mb$1ag$1 digitaldaemon.com...
 BTW, how sensitive are your D hash algorithms to prime numbers? Nada?
Some?
 Seriously so?
??
May 27 2004
parent reply "Walter" <newshound digitalmars.com> writes:
"Kris" <someidiot earthlink.dot.dot.dot.net> wrote in message
news:c95knj$1oss$1 digitaldaemon.com...
 I meant, does the .length of an associative array impact the performance
of
 the algorithms? Some hashing algorithms favour prime array-lengths ...

 Am I completely off base here?
Most of the time, I doubt you'll notice any difference.
May 27 2004
parent reply "Kris" <someidiot earthlink.dot.dot.dot.net> writes:
LOL!

The "Am I completely off base here?" and your answer make a much better
combination than the original question :-)


"Walter" <newshound digitalmars.com> wrote in message
news:c96dut$2tp8$1 digitaldaemon.com...
 "Kris" <someidiot earthlink.dot.dot.dot.net> wrote in message
 news:c95knj$1oss$1 digitaldaemon.com...
 I meant, does the .length of an associative array impact the performance
of
 the algorithms? Some hashing algorithms favour prime array-lengths ...

 Am I completely off base here?
Most of the time, I doubt you'll notice any difference.
May 27 2004
parent "Walter" <newshound digitalmars.com> writes:
Arf! You'll never believe me, but I had intended it to apply to the first
sentence, not the last <g>.

"Kris" <someidiot earthlink.dot.dot.dot.net> wrote in message
news:c96f75$309k$1 digitaldaemon.com...
 LOL!

 The "Am I completely off base here?" and your answer make a much better
 combination than the original question :-)


 "Walter" <newshound digitalmars.com> wrote in message
 news:c96dut$2tp8$1 digitaldaemon.com...
 "Kris" <someidiot earthlink.dot.dot.dot.net> wrote in message
 news:c95knj$1oss$1 digitaldaemon.com...
 I meant, does the .length of an associative array impact the
performance
 of
 the algorithms? Some hashing algorithms favour prime array-lengths ...

 Am I completely off base here?
Most of the time, I doubt you'll notice any difference.
May 28 2004