"John W. Kennedy" <[EMAIL PROTECTED]> writes:

> In order to really know how effective a hash algorithm is, it is
> necessary to have statistics on chain lengths. I don't believe Perl
> gives you that

If you dump a hash using the Deve::Peek module it will tell you how
long the chain lengths are.  For example:

  $ perl -MDevel::Peek -e '%a = (1..20); Dump \%a' 2>&1 | grep ARRAY
  ARRAY = 0x814f720  (0:7, 1:8, 2:1)

This hash ended up with 7 empty slots, 8 with 1 element and 1 with 2
elements.

Regards,
Gisle Aas,
ActiveState
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to