On Tue, Apr 23, 2013 at 5:31 AM, kavita kulkarni
<kavitahkulka...@gmail.com>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 solution for this?
>

Store your data in the hash like normal. Maintain a separate array data
structure with the keys in the order you want. When you need to iterate
over the hash, get the list of keys from the array instead of from calling
keys() on the hash. (This is, I believe, what Tie::IxHash is doing under
the hood; doing it directly without tie() may be faster.)

j.

Reply via email to