On 23/04/2013 13:26, kavita kulkarni wrote:
Can you help me in finding the most time effective way to retrieve the
key-values from hash in the same sequence in which data is inserted into
the hash.
But why would you want that?
You can push the keys in an array as well.
But you will often have
Let me try this way as well. (using array)
Will compare the results with the solution I have implemented and will
continue with the one which is faster. :)
Thanks for all your responses!!
Regards,
Kavita :-)
On Wed, Apr 24, 2013 at 4:12 AM, John Delacour wrote:
> On 23/4/13 at 12:26, kavitahkul
On 23/4/13 at 12:26, kavitahkulka...@gmail.com (kavita kulkarni) wrote:
Can you help me in finding the most time effective way to retrieve the
key-values from hash in the same sequence in which data is inserted into
the hash.
What about this? :
#!/usr/bin/perl
use strict;
my @array;
for (
{
On Tue, Apr 23, 2013 at 8:20 AM, kavita kulkarni
wrote:
>
> I have prefixed keys with numbers & used hash sorting, that resolved the
> issue.
Hmm, why not an array of (e.g. anon. hashes) then? If you're
creating them in order, just push them on an array - got to be cheaper than
sorting hash ke
Thanks All,
I have prefixed keys with numbers & used hash sorting, that resolved the
issue.
Regards,
Kavita :-)
On Tue, Apr 23, 2013 at 6:14 PM, Octavian Rasnita wrote:
> From: "Paul Johnson"
>
> > On Tue, Apr 23, 2013 at 04:56:55PM +0530, kavita kulkarni wrote:
> >> Hello All,
> >>
> >> Can
From: "Paul Johnson"
> On Tue, Apr 23, 2013 at 04:56:55PM +0530, kavita kulkarni wrote:
>> Hello All,
>>
>> Can you help me in finding the most time effective way to retrieve the
>> key-values from hash in the same sequence in which data is inserted into
>> the hash.
>
> Hashes are unordered, s
On Tue, Apr 23, 2013 at 5:31 AM, kavita kulkarni
wrote:
> The values I have stored in the hash should essentially be retrieved in
> order, so normal retrieval is not a correct solution for me.
>
> I have tried using IxHash, but it takes much longer execution time than
> expected. Any other solutio
The values I have stored in the hash should essentially be retrieved in
order, so normal retrieval is not a correct solution for me.
I have tried using IxHash, but it takes much longer execution time than
expected. Any other solution for this?
Regards,
Kavita :-)
On Tue, Apr 23, 2013 at 5:11 PM
> Hello All,
>
> Can you help me in finding the most time effective way to retrieve the
> key-values from hash in the same sequence in which data is inserted
> into
> the hash.
Hashes are unordered, have a look at Tie::IxHash in CPAN,
http://search.cpan.org/~chorny/Tie-IxHash-1.23/lib/Tie/IxHash
On Tue, Apr 23, 2013 at 04:56:55PM +0530, kavita kulkarni wrote:
> Hello All,
>
> Can you help me in finding the most time effective way to retrieve the
> key-values from hash in the same sequence in which data is inserted into
> the hash.
Hashes are unordered, so you cannot directly do what you
On Tue, 23 Apr 2013 16:56:55 +0530
kavita kulkarni wrote:
> Hello All,
>
> Can you help me in finding the most time effective way to retrieve the
> key-values from hash in the same sequence in which data is inserted
> into the hash.
Normal hash ordering is unpredictably random.
The Tie::IxHash
Hello All,
Can you help me in finding the most time effective way to retrieve the
key-values from hash in the same sequence in which data is inserted into
the hash.
Thanks in advance.
Regards,
Kavita
12 matches
Mail list logo