Nicholas Clark wrote:
My understanding is that this makes Perl 5 hash tables amortised O(1).
Hopefully someone else will answer the Perl 6 side properly.
My understanding is that the point of a hash table data structure was
that lookups are amortised O(1). However, doing it right - and cert
On Sat, Aug 22, 2009 at 10:27:58PM +0100, Nicholas Clark wrote:
> Perl 5's hash tables consist of an array of linked lists. The list elements
> consist of a pointer to the next element, pointer to the value stored, and
> pointer to a structure, usually shared, containing the key (length, octets,
>
> On Sat, Aug 22, 2009 at 4:04 PM, Nicholas Clark wrote:
>
> > On Sat, Aug 22, 2009 at 04:01:13PM -0500, Forrest Sheng Bao wrote:
> > > Does anyone know the time complexity of searching elements in hash tables
> > in
> > > Perl? Suppose the number of elements is n.
> > >
> > > I have no idea on h
On Sat, Aug 22, 2009 at 5:07 PM, Forrest Sheng Bao wrote:
> Oh, I mean both Perl 5 and Perl 6. I couldn't find proper list to ask this
> question. So I asked in this list.
I'm not sure perl6-language is the proper place to be asking about the
time-complexity of hashes in Perl6, or at least, not th
Oh, I mean both Perl 5 and Perl 6. I couldn't find proper list to ask this
question. So I asked in this list.
Cheers,
Forrest
Forrest Sheng Bao, BSEE, Graduate Student
Dept. of Computer Science/Electrical Engineering, Texas Tech University
http://narnia.cs.ttu.edu
Sent from Lubbock, TX, United St
On Sat, Aug 22, 2009 at 04:01:13PM -0500, Forrest Sheng Bao wrote:
> Does anyone know the time complexity of searching elements in hash tables in
> Perl? Suppose the number of elements is n.
>
> I have no idea on how Perl automatically builds the hash function and the
> table. If you can tell me h
Does anyone know the time complexity of searching elements in hash tables in
Perl? Suppose the number of elements is n.
I have no idea on how Perl automatically builds the hash function and the
table. If you can tell me how it works, that is also helpful. I can analyze
the algorithm myself.
Cheer
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #68714]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=68714 >
rakudo: say (1, undef, 2, 3).grep(*.defined).perl
rakudo 0d4fe0: OUTPUT«set_integer_k