develooper Front page | perl.perl5.porters | Postings from September 2002

Re: Collections

Thread Previous | Thread Next
From:
Brian Ingerson
Date:
September 30, 2002 11:12
Subject:
Re: Collections
Message ID:
20020930111155.C12692@ttul.org
On 30/09/02 08:23 +0200, Slaven Rezic wrote:
> Brian Ingerson <ingy@ttul.org> writes:
> 
> > On 29/09/02 22:57 +0200, Slaven Rezic wrote:
> > > Brian Ingerson <ingy@ttul.org> writes:
> > > > Something like the MD5 sum of a Storable serialization might work as a first
> > > > cut. Hash key order would need to be canonical. Not sure if
> > > > Storable's is.
> > > 
> > > With $Storable::canonical set to true, it is.
> > 
> > Whee! Cool. I'll RTFM next time :)
> > 
> > I guess this opens up issues for Storable serialization. It will also be
> > interesting to know how to sort complex keys for use as other complex keys.
> > 
> 
> The serialized string of the complex key could be used for sorting.

Yeah, but you really don't want to keep something that large in memory most
likely. The MD5 digest is an attempt to cut down the memory usage. We could
also sort on the digest. Not meaningful, but at least canonical.

Cheers, Brian

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About