Thanks L~R, but it you take a look at 382970, you'll see that the "ordering" isn't sorting.
The re-ordering occurs when a hash element is accessed, according to a hueristic that includes (for example), if a hash element is required that isn't currently being held in the (internal) array, then the lowest ordered item in the array may be discarded to accomodate the called for item. However, an item's position in the array is adjusted each time it is accessed (always by key).
If an item has been STORE'd to, the underlying item will have been modified and so discarding it from the array will require an update to the backing store first.
If the item has only ever been FETCH'd, discarding it is cheaper as the backing store doesn't need an update.
The hueristic can also take into account the frequency of access and/or the recentness(better word?) (or otherwise), of it's last access.
As you can see, this doesn't easily translate into a sort criteria that could be used with your module. (Unless you can see a way :).
Thanks again.
In reply to Re^2: Re-orderable keyed access structure?
by BrowserUk
in thread Re-orderable keyed access structure?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |